var Mg=M.U(M,"AdfDhtmlPanelWindowBasePeer");v("AdfDhtmlPanelWindowBasePeer",Mg);
Mg.m=function(){M.ha(this,I.jb,I.ec,I.Wf,I.qd,I.tc);z.kb(AdfRichPanelWindow);M.hb(this,AdfRichPanelWindow.TITLE_ICON_SOURCE,AdfRichPanelWindow.TITLE,AdfRichPanelWindow.CONTENT_HEIGHT,AdfRichPanelWindow.CONTENT_WIDTH);M.$b(this,AdfRichPanelWindow.CONTENT_HEIGHT,AdfRichPanelWindow.CONTENT_WIDTH);M.ui(this,AdfRichPanelWindow.TITLE,AdfRichPanelWindow.CONTENT_HEIGHT,AdfRichPanelWindow.CONTENT_WIDTH);this.Aoa="_hse";this.g6="_hce";this.zoa="_hee";this.sna="_cse";this.ona="_cee";this.poa="_fse";this.loa=
"_fce";this.moa="_fee";this.noa="_ree";this.ooa="_rse";this.NNa=[this.Aoa,this.g6,this.zoa,this.sna,this.ona,this.poa,this.loa,this.moa,this.noa,this.ooa];this.x6a="_fcc";this.CIa="contentContainer";this.v5="_ccntr";this.rna="data-afr-csfm";this.Boa="tb";this.x5="data-afr-cri";this.SMa="af|panelWindow::resize-ghost";this.iqa="on";this.GOa="first";this.V4="af|panelWindow-tr-open-animation-duration";this.U4="af|panelWindow-tr-animate"};v("AdfDhtmlPanelWindowBasePeer.InitSubclass",Mg.m);
Mg.prototype.RC=function(a){this.hz();w.b.va(a)};z.a("AdfDhtmlPanelWindowBasePeer.prototype.handleEscapeKey",{RC:Mg.prototype.RC});Mg.prototype.ba=function(a){if(!a.na()){var b=w.b,d=a.L(),e=b.T(d);d.keyCode==E.Df?(d.shiftKey?O.Qh(e,this.h()):O.Ud(e,this.h()),b.va(d),a.dc()):d.keyCode==E.xh&&(this.hz(),b.va(d),a.dc())}};z.a("AdfDhtmlPanelWindowBasePeer.prototype.HandleComponentKeyDown",{ba:Mg.prototype.ba});
Mg.prototype.zb=function(a){a.na()||(a.L(),a.ia()==E.$a&&(this.zE(a)?(a.cancel(),a.dc(),this.hz()):this.kT(a)&&this.tT()))};z.a("AdfDhtmlPanelWindowBasePeer.prototype.HandleComponentKeyPress",{zb:Mg.prototype.zb});Mg.prototype.pa=function(a){if(!a.na()){var b=a.L(),d=a.ia();d==E.zd?this.zE(a)&&(this.hz(),a.cancel(),a.dc()):b.ctrlKey&&b.altKey&&(d==E.dF&&!this.d().getModal())&&(xg.O().TQ(),a.cancel(),a.dc())}};z.a("AdfDhtmlPanelWindowBasePeer.prototype.HandleComponentKeyUp",{pa:Mg.prototype.pa});
Mg.prototype.Ha=function(a){a.dd()==Ta.ue&&a instanceof ka&&Ng(this,a,p)};z.a("AdfDhtmlPanelWindowBasePeer.prototype.HandleComponentFocus",{Ha:Mg.prototype.Ha});function Ng(a,b,d){if(!b.na()){var e=a.d(),f=a.h(),g=b.Q();if(H.sb(f,g)&&(a=a.AG(e))&&a.y0(d))b.cancel(),b.dc()}}
function Og(a,b){Ng(a,b,l);var d=a.d();if(!(d!=b.getSource()||d.r("resize")!=Mg.iqa)&&!F.c.im()){var e=b.L(),f=w.b,g=f.T(e),h=g.id;if(h&&(h=h.split("::"),1<h.length&&(h=h[h.length-1],-1<ya.indexOf(Mg.NNa,h)&&(d=a.AG(d))&&!d.Ip()&&H.sb(d.Uh(),g)))){f.preventDefault(e);var g=F.c,m=w.b,f=m.T(e).style;B.s(h);a.t$=h;h=d.IC();B.s(h);a.Bca=d;B.J(d,wg);a.Jea();var h=M.Na(h,Mg.v5),q=a.Uca=m.getElementById(h);B.p(q,"DIV");var s=q.style,y=w.ua(s.width),A=w.ua(s.height),h=w.ua(s.minWidth),m=w.ua(s.minHeight);
a.Gaa=y=0<y?y:q.offsetWidth;a.Faa=A=0<A?A:q.offsetHeight;s.height=A+"px";s.width=y+"px";q=a.vg=q.ownerDocument.createElement("div");s=g.u().getStyleClass(a.kE());H.n(q,s);var s=d.getWidth()-2,C=d.getHeight()-2,y=a.z9=s-y,A=a.A9=C-A;g.Mf().jp(q,Hg.XD);g=q.style;g.cursor=f.cursor;g.top=d.oJ()+"px";g.left=d.YI()+"px";g.width=s+"px";g.height=C+"px";g.minWidth=h+y+"px";g.minHeight=m+A+"px";d.G1(l);d.Q1(p);F.c.Nd(e,a.cca,a.dca,a.R8a,l);b.cancel()}}}
Mg.prototype.C=function(a){a.Jb()&&(this.zE(a)?this.hz():this.kT(a)&&this.tT())};z.a("AdfDhtmlPanelWindowBasePeer.prototype.HandleComponentClick",{C:Mg.prototype.C});Mg.prototype.zE=function(a){a=a.Q();var b=this.d(),b=M.g(b.e(),"close");return a.id==b?l:a.parentNode.id==b};z.a("AdfDhtmlPanelWindowBasePeer.prototype.IsClose",{zE:Mg.prototype.zE});Mg.prototype.kT=function(a){a=a.Q();var b=this.d(),b=M.g(b.e(),"pin");return a.id==b?l:a.parentNode.id==b};
z.a("AdfDhtmlPanelWindowBasePeer.prototype.IsPin",{kT:Mg.prototype.kT});Mg.prototype.sla=function(){var a=this.d().getParent();a instanceof AdfRichPopup?a.rb():this.UC(a)};z.a("AdfDhtmlPanelWindowBasePeer.prototype.Hide",{sla:Mg.prototype.sla});Mg.prototype.hz=function(){var a=this.d().getParent();a instanceof AdfRichPopup?a.cancel():this.Wi(a)};z.a("AdfDhtmlPanelWindowBasePeer.prototype.Cancel",{hz:Mg.prototype.hz});
Mg.prototype.tT=function(){var a=this.d().getParent();if(a instanceof AdfRichPopup&&a[M.Im]){var b=a[M.Im][a.e()].La();F.c.Kk().Lea(a,b)}};z.a("AdfDhtmlPanelWindowBasePeer.prototype.Pin",{tT:Mg.prototype.tT});Mg.prototype.Init=function(a,b){Mg.f.Init.call(this,a,b);this.cca=this.o(this.gaa);this.dca=this.o(this.haa);this.Q8a=this.o(this.VWa)};z.a("AdfDhtmlPanelWindowBasePeer.prototype.Init",{Init:Mg.prototype.Init});
Mg.prototype.q=function(a){var b=a.getParent();b==n&&(b=a);var d={};d.modal=a.getModal();d.dragElement=this.Z_();"none"==a.getInitialFocus()&&!a.getModal()?d.focus=p:d.focus=l;d.autodismiss="autodismissInactivate";d.type="dialogWindow";d[AdfRichPopup.fd]=AdfRichPopup.kK;d.componentEventsEnabled=l;rc.lia(b,d)};z.a("AdfDhtmlPanelWindowBasePeer.prototype.InitDomElement",{q:Mg.prototype.q});Mg.prototype.Z_=function(){var a=M.g(this.d().e(),Mg.Boa);return w.b.getElementById(a)};
z.a("AdfDhtmlPanelWindowBasePeer.prototype.getDragElement",{Z_:Mg.prototype.Z_});Mg.prototype.zK=function(a,b,d){b=w.b;a=M.g(a.e(),"_ttxt");a=b.getElementById(a);b.yb(a,d);return l};z.a("AdfDhtmlPanelWindowBasePeer.prototype.ComponentTitleChanged",{zK:Mg.prototype.zK});
Mg.prototype.lka=function(a,b,d){b=w.b;a=M.g(a.e(),"_ticn");a=b.getElementById(a);var e=b.w().createElement("img");e.alt="";b.xs(e,d);d?(a.hasChildNodes()?a.replaceChild(e,a.firstChild):a.appendChild(e),H.setVisible(a,l)):H.setVisible(a,p)};z.a("AdfDhtmlPanelWindowBasePeer.prototype.ComponentTitleIconSourceChanged",{lka:Mg.prototype.lka});Mg.prototype.Tja=function(a,b,d){Mg.oX(a).style.width=d+"px";b.setAttribute(Mg.x5,"1");return l};
z.a("AdfDhtmlPanelWindowBasePeer.prototype.ComponentContentWidthChanged",{Tja:Mg.prototype.Tja});Mg.prototype.Rja=function(a,b,d){Mg.oX(a).style.height=d+"px";b.setAttribute(Mg.x5,"1");return l};z.a("AdfDhtmlPanelWindowBasePeer.prototype.ComponentContentHeightChanged",{Rja:Mg.prototype.Rja});Mg.prototype.Pka=function(a){a=Mg.oX(a);var b=a.style;return b.width?w.ua(b.width):a.offsetWidth};z.a("AdfDhtmlPanelWindowBasePeer.prototype.GetComponentContentWidth",{Pka:Mg.prototype.Pka});
Mg.prototype.Oka=function(a){a=Mg.oX(a);var b=a.style;return b.height?w.ua(b.height):a.offsetHeight};z.a("AdfDhtmlPanelWindowBasePeer.prototype.GetComponentContentHeight",{Oka:Mg.prototype.Oka});Mg.oX=function(a){var b=a.e(),d=n,d=n;a.r("resize")==Mg.iqa||a.r("stretchChildren")==Mg.GOa?(d=M.Na(b,Mg.v5),d=w.b.getElementById(d),B.p(d,"DIV")):(d=M.Na(b,Mg.CIa),d=w.b.getElementById(d),B.p(d,"TD"));return d};
Mg.prototype.AG=function(a){var b=n,d=(a=a.getParent())?a.k():n;if(d)if(d.bind(a),a instanceof AdfRichPopup)b=d.bs(a,a.e());else{a=d.Eu(a);for(var e in a)if(d=a[e],d instanceof wg){b=d;break}}B.Vi(b,wg);return b};Mg.prototype.Za=function(a,b){Mg.f.Za.call(this,a,b);if(F.c.fha()){var d=this.AG(a);d&&d.z0()}};z.a("AdfDhtmlPanelWindowBasePeer.prototype.BindToComponent",{Za:Mg.prototype.Za});Mg.prototype.Z=function(a){(a=this.AG(a))&&a.Pga()};
z.a("AdfDhtmlPanelWindowBasePeer.prototype.ComponentRemoved",{Z:Mg.prototype.Z});
Mg.prototype.Jea=function(){var a=this.d().e(),b=w.b,d=M.Na(a,Mg.v5),d=b.getElementById(d);B.p(d,"DIV");if(!d.hasAttribute(Mg.rna)){var e=M.Na(a,Mg.g6),f=b.getElementById(e);B.p(f,"TD");for(var e=Math.max(1,f.offsetWidth),g=M.Na(a,Mg.Boa),f=f.getElementsByTagName("TD"),h=a=0;h<f.length;h++){var m=f[h],q=n;m.id&&m.id==g&&(q=m.style.width,m.style.width="1px");for(var s=H.Tc(m),y=0;y<s.length;y++)var A=s[y],a=a+b.MC(A,A.offsetWidth);m.id&&m.id==g&&(m.style.width=q)}b=w.ua(d.style.minWidth);b=Math.max(b,
a);d.style.minWidth=b+"px";b=w.ua(d.style.minHeight);g=Math.max(1,d.offsetHeight);b=Math.max(b,Math.round(a/e*g));d.style.minHeight=b+"px";d.setAttribute(Mg.rna,"1")}};z.a("AdfDhtmlPanelWindowBasePeer.prototype.calculateMinimumContentSize",{Jea:Mg.prototype.Jea});Mg.prototype.kE=function(){return Mg.SMa};z.a("AdfDhtmlPanelWindowBasePeer.prototype.GetResizeGhostSelector",{kE:Mg.prototype.kE});
Mg.prototype.gaa=function(a){var b=w.b,d=b.xf(),e=b.De(),f=b.getWindowWidth(),g=b.getWindowHeight(),h=this.t$;B.s(h);var m=this.vg;B.p(m,"DIV");var m=m.style,q=w.ua(m.width),s=w.ua(m.height);a=b.Qb(a);if(!(a.x<e||a.x>f+e||a.y<d||a.y>g+d)){var d=w.ua(m.minWidth),e=w.ua(m.minHeight),f=w.ua(m.top),g=w.ua(m.left),b=f,y=g,A=q,C=s;switch(h){case Mg.Aoa:f=a.y;s+=b-a.y;g=a.x;q+=y-a.x;s<e&&(f=b,s=C);q<d&&(g=y,q=A);break;case Mg.g6:f=a.y;s+=b-a.y;s<e&&(f=b,s=C);break;case Mg.zoa:f=a.y;s+=b-a.y;q=a.x-y;s<e&&
(f=b,s=C);q<d&&(q=A);break;case Mg.sna:g=a.x;q+=y-a.x;q<d&&(g=y,q=A);break;case Mg.ona:q=a.x-y;q<d&&(q=A);break;case Mg.ooa:case Mg.poa:g=a.x;q+=y-a.x;s=a.y-b;q<d&&(g=y,q=A);s<e&&(s=C);break;case Mg.loa:s=a.y-b;s<e&&(s=C);break;case Mg.noa:case Mg.moa:s=a.y-b,q=a.x-y,s<e&&(s=C),q<d&&(q=A)}b!=f&&(m.top=f+"px");y!=g&&(m.left=g+"px");C!=s&&(m.height=s+"px");A!=q&&(m.width=q+"px")}};
Mg.prototype.haa=function(){var a=F.c,b=this.vg;B.p(b,"DIV");var d=b.style,e=this.Bca;B.J(e,wg);var f=e.IC();B.s(f);var g=this.Gaa;B.df(g);var h=this.Faa;B.df(h);var m=this.Uca;B.p(m,"DIV");var q=this.z9;B.df(q);var s=this.A9;B.df(s);delete this.t$;delete this.Bca;delete this.Gaa;delete this.Faa;delete this.Uca;delete this.z9;delete this.A9;delete this.vg;var y=w.ua(d.top),A=w.ua(d.left),q=w.ua(d.width)-q,d=w.ua(d.height)-s;if((f=a.j(f))&&f.getContentWidth&&f.getContentHeight)f.k().bind(f),q!=g&&
f.setProperty(AdfRichPanelWindow.CONTENT_WIDTH,q,l,l),d!=h&&f.setProperty(AdfRichPanelWindow.CONTENT_HEIGHT,d,l,l);a.Mf().Ci(b);e.Lr();a.Xl(m,p);e.G1(p);e.Q1(l);e.setPosition(y,A)};Mg.prototype.VWa=function(){var a=this.vg;B.p(a,"DIV");delete this.t$;delete this.Bca;delete this.Gaa;delete this.Faa;delete this.Uca;delete this.z9;delete this.A9;delete this.vg;F.c.Mf().Ci(a)};Mg.prototype.eha=function(a){var b=a.k();b.bind(a);return(a=b.h().getAttribute(Mg.x5))&&"1"==a};
z.a("AdfDhtmlPanelWindowBasePeer.prototype.isContentResized",{eha:Mg.prototype.eha});Mg.prototype.FI=function(){return Mg.V4};z.a("AdfDhtmlPanelWindowBasePeer.prototype.getAnimationDurationSkinProperty",{FI:Mg.prototype.FI});Mg.prototype.EI=function(){return Mg.U4};z.a("AdfDhtmlPanelWindowBasePeer.prototype.getAnimateSkinProperty",{EI:Mg.prototype.EI});