var hm=M.U(M,"AdfDhtmlCommandMenuItemPeer");v("AdfDhtmlCommandMenuItemPeer",hm);hm.m=function(){z.kb(AdfRichCommandMenuItem);z.kb(W);M.ha(this,I.Xc,I.Xf,I.jb,I.tc,I.Dd,I.qd,I.ec);w.b.cd()[w.Vc]==w.Wc&&M.ha(this,I.Qd,I.Ve);M.hb(this,AdfRichCommandMenuItem.DISABLED,AdfRichCommandMenuItem.SELECTED,AdfRichCommandMenuItem.VISIBLE);M.$b(this,AdfRichCommandMenuItem.TEXT);this.yL="_afrGrp";this.ve="_busy"};v("AdfDhtmlCommandMenuItemPeer.InitSubclass",hm.m);
hm.prototype.Init=function(a){a.getParent();hm.f.Init.call(this,a);this.ep=this.Oo=p};z.a("AdfDhtmlCommandMenuItemPeer.prototype.Init",{Init:hm.prototype.Init});hm.prototype.q=function(a,b){hm.f.q.call(this,a,b);var d=a.getAccelerator();d!=n&&M.Qy(a,d,this.Xm)};z.a("AdfDhtmlCommandMenuItemPeer.prototype.InitDomElement",{q:hm.prototype.q});hm.prototype.Z=function(a){var b=a.getAccelerator();b!=n&&M.Cv(a,b);hm.f.Z.call(this,a)};z.a("AdfDhtmlCommandMenuItemPeer.prototype.ComponentRemoved",{Z:hm.prototype.Z});
hm.prototype.Te=function(){return this.d().getText()};z.a("AdfDhtmlCommandMenuItemPeer.prototype.GetAccessibleName",{Te:hm.prototype.Te});hm.prototype.Xb=function(a,b){var d=a.getParent();if(d=window.AdfRichMenu&&d instanceof AdfRichMenu?H.Tc(b)[1]:H.Ua(b,"a"))if("antonym"==a.getType()&&(d=H.ca(d)),d)return d=w.b.Mb(d),""==d?n:d;B.assert(p,"Unable to find the element containing the text")};z.a("AdfDhtmlCommandMenuItemPeer.prototype.GetComponentText",{Xb:hm.prototype.Xb});
hm.prototype.pa=function(a){var b=a.L();if(!b.ctrlKey){var d=w.b.ia(b),b=this.d(),e=b.r(hm.ve);switch(d){case E.$a:this.Oo&&!e&&this.Xm();this.Oo=p;d=l;break;case E.zd:this.ep&&!e&&this.Xm();this.ep=p;d=l;break;default:return}d&&a.cancel();(a=b.getParent())&&a instanceof AdfRichMenu&&a.k().Vn()}};z.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentKeyUp",{pa:hm.prototype.pa});
hm.prototype.ba=function(a){if(!a.na()&&!this.Gd()){var b=a.ia();b==E.$a?(this.Oo=l,a.cancel(),a.dc()):b==E.zd&&(this.ep=l,a.cancel(),a.dc())}};z.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentKeyDown",{ba:hm.prototype.ba});hm.prototype.Ha=function(a){if(!this.Gd()){a.cancel();a=this.h();im.rC();var b=this.d();W.Bi(b)?H.n(a,W.Pg):(W.Mp()&&W.Rj(p),W.By(a))}};z.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentFocus",{Ha:hm.prototype.Ha});
hm.prototype.qa=function(a){!this.Gd()&&a.Jb()&&(a=this.h(),H.n(a,W.Bf))};z.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentMouseDown",{qa:hm.prototype.qa});hm.prototype.cc=function(a){!this.Gd()&&a.Jb()&&(a=this.h(),H.F(a,W.Bf))};z.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentMouseUp",{cc:hm.prototype.cc});
hm.prototype.Ka=function(a){var b=this.d();if(this.Gd())W.Mp()&&W.cv(b)&&W.Rj(p);else{a.cancel();a=this.h();var d=O.Vl(a);W.Bi(b)?(H.n(a,W.Pg),W.kh(a,p),d||this.focus(b)):W.Mp()&&!d?this.focus(b):W.By(a)}};z.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentMouseOver",{Ka:hm.prototype.Ka});hm.prototype.vb=function(a){a.cancel();W.wS();this.Gd()||(a=this.d(),W.Bi(a)&&this.hr(),a=this.h(),H.F(a,W.Bf))};z.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentMouseOut",{vb:hm.prototype.vb});
hm.prototype.Eb=function(){this.hr()};z.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentBlur",{Eb:hm.prototype.Eb});hm.prototype.C=function(a){var b=this.d().r(hm.ve);a.Jb()&&(!this.Gd()&&!b)&&this.Xm();a.cancel()};z.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentClick",{C:hm.prototype.C});hm.prototype.Od=function(a,b,d){W.Y0(a,b,d)};z.a("AdfDhtmlCommandMenuItemPeer.prototype.ComponentDisabledChanged",{Od:hm.prototype.Od});
hm.prototype.Zn=function(a,b,d){var e=a.getType();if("check"==e||"radio"==e)(W.Bi(a)?b:H.ca(b)).setAttribute("aria-checked",d?"true":"false");d?(H.n(b,W.q4),"radio"==e&&this.Px()):H.F(b,W.q4)};z.a("AdfDhtmlCommandMenuItemPeer.prototype.ComponentSelectedChanged",{Zn:hm.prototype.Zn});hm.prototype.fk=function(a,b,d,e){hm.f.fk.call(this,a,b,d,e);W.Z0(a,b,d)};z.a("AdfDhtmlCommandMenuItemPeer.prototype.ComponentVisibleChanged",{fk:hm.prototype.fk});
hm.prototype.gd=function(a){var b=this.d(),d=this.h(),e=H.Se(d);e&&(e=H.ZC(e),!b.getDisabled()&&(!e&&!F.c.Dg())&&(H.td(a,d,M.gb),b.setProperty(hm.ve,a,p,J.Pc)))};z.a("AdfDhtmlCommandMenuItemPeer.prototype.SetBusy",{gd:hm.prototype.gd});hm.prototype.uc=function(a){this.bind(a);a=this.Ee(a);var b=a!=n?a.k():n;b&&b.uc&&b.uc(a)};z.a("AdfDhtmlCommandMenuItemPeer.prototype.__preferredSizeChangeNotify",{uc:hm.prototype.uc});u=hm.prototype;
u.Xm=function(){if(!this.Gd()){D.i.finest("menuBar auto open mode, set to OFF due to commandMenuItem execute");W.uv(p);for(var a=this.d(),b=a.getParent();b instanceof AdfRichMenu;)b=b.getParent();b instanceof AdfRichPopup?(W.Rj(p),b.k().rb(b)):(b=W.Bi(a),W.Rj(b));b=W.Hfa(a);b!=n&&W.pia(a,b);b=new bb(a);b.v(a.getPartialSubmit());b.na()||(b=a.getType(),"check"==b||"antonym"==b?a.setSelected(!a.getSelected()):"radio"==b&&this.Px())}};
u.Px=function(){var a=this.d(),b=this.h(),b=this.Pt(b);if(b==n)D.i.warning("Unexpected to have commandMenuItem without a group Id."),a.setSelected(!a.getSelected());else{if(W.Bi(a))for(var d=this.d(),e=this.h().parentNode.childNodes,f=0;f<e.length;f++){var g=e[f],h=this.Pt(g);if(b==h&&(g=g.id))g=F.c.j(g),g!=d&&(g.getType&&"radio"==g.getType())&&g.setSelected(p)}else if(W.cv(a)){d=this.d();e=d.getParent();e=e.k().ce(e);for(f=0;f<e.length;f++)g=e[f],h=g.k(),h!=n&&(h=h.h(),h=this.Pt(h),b==h&&g!=d&&(g.getType&&
"radio"==g.getType())&&g.setSelected(p))}a.setSelected(l)}};u.Pt=function(a){return a.getAttribute?a.getAttribute(hm.yL):n};u.hr=function(){var a=this.h();H.F(a,W.Pg)};u.Gd=function(){var a=this.h();return a.disabled||H.ta(a,M.gb)};