var rc=M.U(M,"AdfDhtmlPopupPeer",l);v("AdfDhtmlPopupPeer",rc);rc.m=function(){z.kb(AdfRichPopup);this.zF="_shown";this.zM=[AdfRichPopup.pf,AdfRichPopup.fd,"leftPosition","topPosition",AdfRichPopup.Cf,"mousePosition"];this.Y5a="_skipOutOfScopeCheck";M.ha(this,I.Wf,I.tc,I.Dd)};v("AdfDhtmlPopupPeer.InitSubclass",rc.m);rc.prototype.Ha=function(a){a instanceof ka&&(a=a.Q(),It(this,a))};z.a("AdfDhtmlPopupPeer.prototype.HandleComponentFocus",{Ha:rc.prototype.Ha});
rc.prototype.Eb=function(){var a=w.b.w().activeElement;It(this,a)};z.a("AdfDhtmlPopupPeer.prototype.HandleComponentBlur",{Eb:rc.prototype.Eb});function It(a,b){var d=a.d();if(d[M.Im]&&d[M.Im][d.e()]){var e=d[M.Im][d.e()].La(),f=F.c.Kk();H.sb(e,b)?f.Yia(d,e):f.$ha(d,e)}}
rc.prototype.zb=function(a){if(a.ia()==E.$a&&(a.dc(),a=Qm.CM(a,l),a!=n&&(a=Rm.Lfa(a)))){var b=a.e();if(0!=this.d().e().indexOf(b+":")){var b=a.getDefaultCommand(),d=a.j(b);d?bb.v(d,d.getPartialSubmit()):D.i.warning("DefaultCommand with the ID of '"+b+"' is not found for component: "+a)}}};z.a("AdfDhtmlPopupPeer.prototype.HandleComponentKeyPress",{zb:rc.prototype.zb});rc.prototype.J_=function(a){return a.Uaa?a.Lwa=l:p};z.a("AdfDhtmlPopupPeer.prototype.fetchCanceled",{J_:rc.prototype.J_});
rc.prototype.show=function(a,b){B.J(a,J);B.ih(b);if(!this.hc(a)){var d=a.getContentDelivery(),e=d==AdfRichPopup.Lja,d=d==AdfRichPopup.KS,f=n;b&&(f=b[AdfRichPopup.Cf]);if(e||d){if(a.Uaa){D.i.fine("Waiting on popup content delivery: "+a.e());return}if(!a.xX){d=F.c;e=rc.xN(a.e());d.Pf(e,b);var g;f!=n&&(g={},g.launchId=f);this.rS(a,b,l);a.Uaa=l;(new Nf(a,Nf.kj,g)).v();return}}d&&delete a.xX;a.Lwa?(delete a.Lwa,this.ou(a,p)):(g=new Ub(a,b),a.pC(g),g.na()?this.ou(a,p):(rc.Swa(a)&&rc.Hu(a)&&F.c.le.us(a,
p),b||(b={}),(g=a.getAutoDismissalTimeout())&&(!isNaN(g)&&0<g)&&(b.autodismissPopupTimeout=1E3*g),g=b.restoreImmediate?l:p,b.openedHandler=this.o(this.m4),b.openedHandlerParam=a,b.animate!=AdfRichPopup.lK&&(b.animate=a.getAnimate()),!d&&!g&&this.rS(a,b,l),this.ou(a,l,d||g),this.Jl(a,b)))}};z.a("AdfDhtmlPopupPeer.prototype.show",{show:rc.prototype.show});rc.prototype.ou=function(a,b,d){delete this.sB;a.setProperty(rc.zF,b?a.e():"",p,l);!d&&(this.sB&&!rc.nB(a))&&(new Nf(a,Nf.oL)).v();delete this.sB};
rc.Dwa=function(a){B.J(a,AdfRichPopup);if(!rc.nB(a))for(var b=0;b<rc.zM.length;b++)a.setProperty("_"+rc.zM[b],"",p,l)};rc.prototype.rS=function(a,b,d){B.J(a,AdfRichPopup);if(b&&!rc.nB(a)){delete this.sB;var e;for(key in b)if(-1<ya.indexOf(rc.zM,key)){e="_"+key;var f;"mousePosition"==key?(B.Ea(b[key].x,"AdfDhtmlPopupHints.MOUSEPOSITION.x"),B.Ea(b[key].y,"AdfDhtmlPopupHints.MOUSEPOSITION.y"),f="x:"+b[key].x+",y:"+b[key].y):f=b[key];a.setProperty(e,f,p,l)}!d&&this.sB&&(new Nf(a,Nf.oL)).v();delete this.sB}};
z.a("AdfDhtmlPopupPeer.prototype.syncPrivateProperties",{rS:rc.prototype.rS});rc.prototype.Ks=function(a){if(!rc.nB(a.getSource()))if(a=a.kJ(),a==rc.zF)this.sB=l;else for(var b=0;b<rc.zM.length;b++)if(a=="_"+rc.zM[b]){this.sB=l;break}};z.a("AdfDhtmlPopupPeer.prototype.ComponentPropertyChanged",{Ks:rc.prototype.Ks});rc.prototype.rb=function(a){this.hc(a)&&(a.getContentDelivery()==AdfRichPopup.KS&&delete a.xX,this.ob(a,a.e()))};z.a("AdfDhtmlPopupPeer.prototype.hide",{rb:rc.prototype.rb});
rc.prototype.cancel=function(a){this.hc(a)&&(a.getContentDelivery()==AdfRichPopup.KS&&delete a.xX,this.Xi(a,a.e()))};z.a("AdfDhtmlPopupPeer.prototype.cancel",{cancel:rc.prototype.cancel});rc.prototype.hc=function(a){return this.Qa(a,a.e())};z.a("AdfDhtmlPopupPeer.prototype.isVisible",{hc:rc.prototype.hc});rc.xN=function(a){B.s(a);return a.split(":").join("$")+"$key"};rc.prototype.$n=function(a){if(a.getType()==Nf.T3){var b=a.getSource();Jt(this,b);a.dc();a.cancel()}else rc.f.$n.call(this,a)};
z.a("AdfDhtmlPopupPeer.prototype.DispatchComponentEvent",{$n:rc.prototype.$n});function Jt(a,b){b.xX=l;var d=F.c,e=rc.xN(b.e()),f=d.Ge(e);d.Pf(e,n);B.ih(f);delete b.Uaa;a.show(b,f)}rc.prototype.sfa=function(a){var b=this.d();if(a){var d=F.c,e=rc.xN(b.e()),f=d.Ge(e);f&&ya.qb(a,f);d.Pf(e,a)}a&&a.restoreImmediate?Jt(this,b):(new Nf(b,Nf.T3)).v()};v("AdfDhtmlPopupPeer.prototype.fireContentDeliveryNotify",rc.prototype.sfa);z.a("AdfDhtmlPopupPeer.prototype.fireContentDeliveryNotify",{sfa:rc.prototype.sfa});
rc.prototype.Z=function(a){if(rc.nB(a)&&""===a.r(rc.zF)){var b=rc.xN(a.e())+"$hidden";F.c.Pf(b,l)}(a=rc.Hu(a))&&F.c.th(a)};z.a("AdfDhtmlPopupPeer.prototype.ComponentRemoved",{Z:rc.prototype.Z});rc.Hu=function(a){a=M.g(a.e(),"content");return w.b.getElementById(a)};v("AdfDhtmlPopupPeer.getContentDom",rc.Hu);rc.prototype.Jl=function(a,b){var d=rc.Hu(a),e={};a.vW&&ya.qb(e,a.vW);b&&ya.qb(e,b);var f=this.rO(a,e);f!=n?f.show(e):this.fe(a,d,e,a.e())};
rc.prototype.rO=function(a,b){var d=n,e=b.type;if(e==n||"menu"==e)a.lg(this.yQ,this,l),this.kr&&(d=this.kr.k(),delete this.kr);return d};rc.prototype.yQ=function(a){var b=F.c.R();if(b.AdfRichRegion&&a instanceof AdfRichRegion)return 0;b.AdfRichMenu&&a instanceof AdfRichMenu&&(this.kr=a);return 2};rc.prototype.Va=function(a,b){if(b){var d=w.b,e=rc.eYa(a,b);if(!e){rc.Dwa(a);var f=rc.Xra(a,b);this.ou(a,p,f)}d.getElementById(a.e()).appendChild(b);e||(new Rb(a)).v()}else rc.Dwa(a),this.ou(a,p),(new Rb(a)).v()};
z.a("AdfDhtmlPopupPeer.prototype.PopupClosed",{Va:rc.prototype.Va});rc.Xra=function(a,b){B.J(a,AdfRichPopup);B.p(b);var d="true"==b.getAttribute(vg.V7);b.removeAttribute(vg.V7);var e=p;d&&(e=rc.Swa(a)&&F.c.le.SC(a),d=new Pb(a,e),e&&F.c.le.us(a,p),e=d.M(),d.v(l));return e};rc.nB=function(a){B.J(a,AdfRichPopup);return a.getAutoCancel()==AdfRichPopup.zja?l:p};rc.eYa=function(a,b){B.J(a,AdfRichPopup);B.p(b);var d="true"==b.getAttribute(vg.DM),d=!rc.nB(a)&&d;b.removeAttribute(vg.DM);return d};
rc.prototype.m4=function(a){(new Sb(a)).v()};z.a("AdfDhtmlPopupPeer.prototype.PopupOpened",{m4:rc.prototype.m4});rc.lia=function(a,b){a.vW=b};v("AdfDhtmlPopupPeer.setChildHints",rc.lia);rc.prototype.Za=function(a,b){rc.f.Za.call(this,a,b);if(rc.nB(a)){var d=rc.xN(a.e())+"$hidden";F.c.Ge(d)&&(this.ou(a,p,l),F.c.Pf(d,p))}};z.a("AdfDhtmlPopupPeer.prototype.BindToComponent",{Za:rc.prototype.Za});
rc.Swa=function(a){B.J(a,AdfRichPopup);return a.getResetEditableValues()==AdfRichPopup.Xla||(a.r(Pb.zpa)?l:p)};rc.prototype.Ab=function(a,b){this.d();rc.f.Ab.call(this,a,b)};z.a("AdfDhtmlPopupPeer.prototype.ReplaceDomElement",{Ab:rc.prototype.Ab});