var ao=I.ea(I,"AdfDhtmlCommandMenuItemPeer");m("AdfDhtmlCommandMenuItemPeer",ao);ao.C=function(){r.bb(AdfRichCommandMenuItem);r.bb(W);I.ra(this,D.Bd,D.Rg,D.wb,D.Oc,D.Nd,D.Ad,D.Bc);q.b.Dd()&&"Windows"!=q.Bh()||I.ra(this,D.ze,D.gg);I.sb(this,AdfRichCommandMenuItem.DISABLED,AdfRichCommandMenuItem.SELECTED,AdfRichCommandMenuItem.VISIBLE);I.hc(this,AdfRichCommandMenuItem.TEXT);this.jS="_afrGrp";this.df="_busy"};m("AdfDhtmlCommandMenuItemPeer.InitSubclass",ao.C);
ao.prototype.Init=function(a){a.getParent();ao.h.Init.call(this,a);this.Qr=this.wr=!1};r.a("AdfDhtmlCommandMenuItemPeer.prototype.Init",{Init:ao.prototype.Init});ao.prototype.G=function(a,b){ao.h.G.call(this,a,b);var d=a.getAccelerator();null!=d&&I.TC(a,d,this.lp)};r.a("AdfDhtmlCommandMenuItemPeer.prototype.InitDomElement",{G:ao.prototype.G});ao.prototype.ka=function(a){var b=a.getAccelerator();null!=b&&I.oz(a,b);ao.h.ka.call(this,a)};r.a("AdfDhtmlCommandMenuItemPeer.prototype.ComponentRemoved",{ka:ao.prototype.ka});
ao.prototype.Gf=function(){return this.f().getText()};r.a("AdfDhtmlCommandMenuItemPeer.prototype.GetAccessibleName",{Gf:ao.prototype.Gf});ao.prototype.sc=function(a,b){var d=a.getParent();if(d=window.AdfRichMenu&&d instanceof AdfRichMenu?C.Dc(b)[1]:C.ib(b,"a"))if("antonym"==a.getType()&&(d=C.pa(d)),d)return d=q.b.mc(d),""==d?null:d;u.assert(!1,"Unable to find the element containing the text")};r.a("AdfDhtmlCommandMenuItemPeer.prototype.GetComponentText",{sc:ao.prototype.sc});
ao.prototype.za=function(a){var b=a.U();if(!b.ctrlKey){var d=q.b.na(b),b=this.f(),e=b.K(ao.df);switch(d){case w.jb:this.wr&&!e&&this.lp();this.wr=!1;d=!0;break;case w.gd:this.Qr&&!e&&this.lp();this.Qr=!1;d=!0;break;default:return}d&&a.cancel();(a=b.getParent())&&a instanceof AdfRichMenu&&a.o().Mm()}};r.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentKeyUp",{za:ao.prototype.za});
ao.prototype.ma=function(a){if(!a.Aa()&&!this.Le()){var b=a.na();b==w.jb?(this.wr=!0,a.cancel(),a.wc()):b==w.gd&&(this.Qr=!0,a.cancel(),a.wc())}};r.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentKeyDown",{ma:ao.prototype.ma});ao.prototype.Ta=function(a){if(!this.Le()){a.cancel();a=this.i();bo.pH();var b=this.f();W.Pi(b)?C.w(a,W.Nh):(W.us()&&W.cl(!1),W.HC(a))}};r.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentFocus",{Ta:ao.prototype.Ta});
ao.prototype.Fa=function(a){!this.Le()&&a.ec()&&(a=this.i(),C.w(a,W.cf))};r.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentMouseDown",{Fa:ao.prototype.Fa});ao.prototype.Ac=function(a){!this.Le()&&a.ec()&&(a=this.i(),C.O(a,W.cf))};r.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentMouseUp",{Ac:ao.prototype.Ac});
ao.prototype.$a=function(a){var b=this.f();if(this.Le())W.us()&&W.Ny(b)&&W.cl(!1);else{a.cancel();a=this.i();var d=J.io(a);W.Pi(b)?(C.w(a,W.Nh),W.uh(a,!1),d||this.focus(b)):W.us()&&!d?this.focus(b):W.HC(a)}};r.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentMouseOver",{$a:ao.prototype.$a});ao.prototype.fc=function(a){a.cancel();W.p_();this.Le()||(a=this.f(),W.Pi(a)&&this.Zt(),a=this.i(),C.O(a,W.cf))};r.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentMouseOut",{fc:ao.prototype.fc});
ao.prototype.Lb=function(){this.Zt()};r.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentBlur",{Lb:ao.prototype.Lb});ao.prototype.M=function(a){var b=this.f().K(ao.df);!a.ec()||this.Le()||b||this.lp();a.cancel()};r.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentClick",{M:ao.prototype.M});ao.prototype.we=function(a,b,d){W.u$(a,b,d)};r.a("AdfDhtmlCommandMenuItemPeer.prototype.ComponentDisabledChanged",{we:ao.prototype.we});
ao.prototype.yq=function(a,b,d){var e=a.getType();"check"!=e&&"radio"!=e||(W.Pi(a)?b:C.pa(b)).setAttribute("aria-checked",d?"true":"false");d?(C.w(b,W.gE),"radio"==e&&this.UB()):C.O(b,W.gE)};r.a("AdfDhtmlCommandMenuItemPeer.prototype.ComponentSelectedChanged",{yq:ao.prototype.yq});ao.prototype.Bl=function(a,b,d,e){ao.h.Bl.call(this,a,b,d,e);W.v$(a,b,d)};r.a("AdfDhtmlCommandMenuItemPeer.prototype.ComponentVisibleChanged",{Bl:ao.prototype.Bl});
ao.prototype.vd=function(a){var b=this.f(),d=this.i(),e=C.lf(d);e&&(e=C.ZH(e),b.getDisabled()||e||A.c.Zg()||(C.qd(a,d,I.lb),b.setProperty(ao.df,a,!1,G.ud)))};r.a("AdfDhtmlCommandMenuItemPeer.prototype.SetBusy",{vd:ao.prototype.vd});ao.prototype.ad=function(a){this.bind(a);a=this.af(a);var b=null!=a?a.o():null;b&&b.ad&&b.ad(a)};r.a("AdfDhtmlCommandMenuItemPeer.prototype.__preferredSizeChangeNotify",{ad:ao.prototype.ad});k=ao.prototype;
k.lp=function(){if(!this.Le()){v.l.finest("menuBar auto open mode, set to OFF due to commandMenuItem execute");W.gz(!1);for(var a=this.f(),b=a.getParent();b instanceof AdfRichMenu;)b=b.getParent();b instanceof AdfRichPopup?(W.cl(!1),b.o().Tb(b)):(b=W.Pi(a),W.cl(b&&!W.rta(a)));b=W.rra(a);null!=b&&W.Gua(a,b);b=new ab(a);b.F(a.getPartialSubmit());b.Aa()||(b=a.getType(),"check"==b||"antonym"==b?a.setSelected(!a.getSelected()):"radio"==b&&this.UB())}};
k.UB=function(){var a=this.f(),b=this.i(),b=this.ix(b);if(null==b)v.l.warning("Unexpected to have commandMenuItem without a group Id."),a.setSelected(!a.getSelected());else{if(W.Pi(a))for(var d=this.f(),e=this.i().parentNode.childNodes,f=0;f<e.length;f++){var g=e[f],h=this.ix(g);b==h&&(g=g.id)&&(g=A.c.m(g),g!=d&&g.getType&&"radio"==g.getType()&&g.setSelected(!1))}else if(W.Ny(a))for(d=this.f(),e=d.getParent(),e=e.o().Cd(e),f=0;f<e.length;f++)g=e[f],h=g.o(),null!=h&&(h=h.i(),h=this.ix(h),b==h&&g!=
d&&g.getType&&"radio"==g.getType()&&g.setSelected(!1));a.setSelected(!0)}};k.ix=function(a){return a.getAttribute?a.getAttribute(ao.jS):null};k.Zt=function(){var a=this.i();C.O(a,W.Nh)};k.Le=function(){var a=this.i();return a.disabled||C.sa(a,I.lb)};