var ql=I.ea(I,"AdfDhtmlButtonPeer");m("AdfDhtmlButtonPeer",ql);ql.C=function(){I.ra(this,D.Bc,D.wb,D.Bd,D.Rg);q.b.Dd()||I.ra(this,D.ze,D.gg);I.sb(this,AdfRichButton.DISABLED,AdfRichButton.SELECTED,AdfRichButton.SHORT_DESC,AdfRichButton.TEXT);I.hc(this,AdfRichButton.TEXT);this.aT="popEl";this.ZS="popCtr";this.$S="popArea";this.Qfa="popup";this.Mf="_afrPopId";this.jS="_afrGrp";this.Ph="p_AFDepressed";this.Mj="p_AFSelected";this.df="_busy"};m("AdfDhtmlButtonPeer.InitSubclass",ql.C);
ql.prototype.tb=function(a,b){ql.h.tb.call(this,a,b);this.dF=C.sa(b,"p_AFActionDisabled")};r.a("AdfDhtmlButtonPeer.prototype.BindToComponent",{tb:ql.prototype.tb});ql.prototype.ma=function(a){if(!a.Aa()){var b=a.na();if(this.In(a)){var d=this.pp(),e=this.dF&&(b==w.jb||b==w.gd);b==w.Ra||e?this.PW(d,!0,a):b==w.gd&&(null!=this.f().getDestination()?(this.K4(a),rl(this,f)):this.J4(),a.cancel())}if(b==w.Ih){var f=this.f();d||(d=f.g());this.Jb(f,d)}}};
r.a("AdfDhtmlButtonPeer.prototype.HandleComponentKeyDown",{ma:ql.prototype.ma});ql.prototype.M=function(a){if(a.ec()&&!this.dF&&!this.cW(a)&&this.In(a)){var b=this.f(),d=b.K(ql.df);b.getDisabled()||d||(null!=this.f().getDestination()?(this.K4(a),rl(this,b)):this.J4())}};r.a("AdfDhtmlButtonPeer.prototype.HandleComponentClick",{M:ql.prototype.M});ql.prototype.$a=function(a){!this.f().getDisabled()&&this.In(a)&&this.Vl(this.f())};r.a("AdfDhtmlButtonPeer.prototype.HandleComponentMouseOver",{$a:ql.prototype.$a});
ql.prototype.fc=function(a){var b=this.f();!b.getDisabled()&&this.In(a)&&(b.getSelected()?(this.Gb(b,!0),this.Ul(b)):(this.Gb(b,!1),this.Di(b)))};r.a("AdfDhtmlButtonPeer.prototype.HandleComponentMouseOut",{fc:ql.prototype.fc});ql.prototype.Ac=function(a){var b=this.f();!b.getDisabled()&&a.ec()&&this.In(a)&&(this.Gb(b,!1),this.Vl(b))};r.a("AdfDhtmlButtonPeer.prototype.HandleComponentMouseUp",{Ac:ql.prototype.Ac});
ql.prototype.Fa=function(a){var b=this.f(),d=a.ec();!b.getDisabled()&&d&&this.In(a)&&(this.Gb(b,!0),this.Ul(b),this.dF||this.cW(a))&&(b=this.pp(),this.PW(b,!1,a))};r.a("AdfDhtmlButtonPeer.prototype.HandleComponentMouseDown",{Fa:ql.prototype.Fa});ql.prototype.we=function(a,b,d){var e=C.ib(b,"A");1==d?(C.w(b,I.lb),e.removeAttribute("href"),this.VA(a),this.SG(a),e.setAttribute(J.Hh,"false")):(C.O(b,I.lb),e.setAttribute("href","#"),this.Di(a),this.FG(a),e.setAttribute(J.Hh,"true"))};
r.a("AdfDhtmlButtonPeer.prototype.ComponentDisabledChanged",{we:ql.prototype.we});ql.prototype.yq=function(a,b,d){var e=a.getType();d?(this.Gb(a,!0),C.w(b,ql.Mj),this.Ul(a),"radio"==e&&(this.UB(),this.Oja(a)),"check"==e&&this.Pja(a)):(this.Gb(a,!1),C.O(b,ql.Mj),this.Di(a),"radio"==e&&this.xja(a),"check"==e&&this.yja(a))};r.a("AdfDhtmlButtonPeer.prototype.ComponentSelectedChanged",{yq:ql.prototype.yq});
ql.prototype.Cz=function(a,b,d){b.setAttribute("title",d);if(a=this.Zl(a))a.setAttribute("title",d),a.setAttribute("alt",d)};r.a("AdfDhtmlButtonPeer.prototype.ComponentShortDescChanged",{Cz:ql.prototype.Cz});ql.prototype.Jg=C.YE;ql.prototype.Oa=function(){return hi.jd()};r.a("AdfDhtmlButtonPeer.prototype.GetInlineEditor",{Oa:ql.prototype.Oa});
ql.prototype.sc=function(a,b){var d=I.j(a.g(),ql.$S);if(d=(d=q.b.getElementById(d))?C.lc(d):b){if(d=C.ib(d,"span"))if(d=q.b.mc(d),""!=d)return d;return null}u.assert(!1,"Unable to find the element containing the text")};r.a("AdfDhtmlButtonPeer.prototype.GetComponentText",{sc:ql.prototype.sc});ql.prototype.ob=function(a,b,d){ql.h.ob.call(this,a,b);a=a.g();d==a&&(d=I.la(a,ql.ZS),(d=q.b.getElementById(d))&&d.appendChild(b))};r.a("AdfDhtmlButtonPeer.prototype.PopupClosed",{ob:ql.prototype.ob});
ql.prototype.vd=function(a){var b=this.f(),d=this.i();!C.lf(d)||b.getDisabled()||A.c.Zg()||(C.qd(a,d,I.lb),b.setProperty(ql.df,a,!1,G.ud))};r.a("AdfDhtmlButtonPeer.prototype.SetBusy",{vd:ql.prototype.vd});ql.prototype.td=function(){var a=this.f();return a&&a.K(ql.df)};r.a("AdfDhtmlButtonPeer.prototype.isBusy",{td:ql.prototype.td});ql.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("AdfDhtmlButtonPeer.prototype.__preferredSizeChangeNotify",{ad:ql.prototype.ad});
k=ql.prototype;k.J4=function(){var a=this.f(),b=new ab(a);b.F(a.getPartialSubmit());b.Aa()||rl(this,a)};k.K4=function(a){var b=this.i(),b=C.ib(b,"a"),d=b.getAttribute("href");if(null==d||""==d)a.cancel();else{var e=q.b.R().location.href,f=e.indexOf("#");if(-1==d.indexOf(-1==f?e:e.substring(0,f))||1<d.substring(d.indexOf("#")).length)d=b.getAttribute("target"),A.c.$E(b.attributes.href.value,d),a.cancel()}};
function rl(a,b){var d=b.getType();"check"==d?b.setSelected(!b.getSelected()):"radio"==d&&a.UB()}
k.PW=function(a,b,d){var e=this.f(),f=e.g(),g=I.la(f,ql.aT);if(q.b.getElementById(g))if(g=this.i(),null!=a)e=A.c.m(a).o(),a={},a.alignElement=g,a[AdfRichPopup.Ed]=AdfRichPopup.qf,a.focus=b,e.show(a),d.cancel();else{a=I.la(f,ql.ZS);var h=q.b.getElementById(a);if(null!=h){for(var l=h.firstChild;l&&8==l.nodeType;)l=l.nextSibling;if(null!=l){a={};var n=I.la(f,ql.Qfa);l.id!=n&&(h=h.ownerDocument.createElement("div"),h.appendChild(l),l=h,l.id=n);a.autodismiss="autodismissAlways";a.alignElement=g;a[AdfRichPopup.Ed]=
AdfRichPopup.qf;a.focus=b;this.He(e,l,a,f);d.cancel()}}}};k.UB=function(){for(var a=this.f(),b=this.i(),b=this.ix(b),d=a.getParent(),d=d.o().Cd(d),e=0;e<d.length;e++){var f=d[e],g=I.Fb(f),g=this.ix(g);b==g&&f!=a&&f.getType&&"radio"==f.getType()&&this.ipa(f)}a.setSelected(!0)};k.ix=function(a){return a.getAttribute(ql.jS)};k.ipa=function(a){a.setSelected(!1);this.Gb(a,!1);this.Di(a)};k.Zl=function(a){a=a.g();a=I.la(a,"icon");return q.b.getElementById(a)};k.Di=function(a){this.Hd(a,null)};
k.Ul=function(a){this.Hd(a,a.getDepressedIcon())};k.Vl=function(a){a.getSelected()||this.Hd(a,a.getHoverIcon())};k.VA=function(a){this.Hd(a,a.getDisabledIcon())};k.Hd=function(a,b){if(I.xo(a))b&&v.l.warning("component: ",a.g(),", depressed, disabled and hover icons are not supported wheniconDelivery is inline/fetchAndInline for svg icons.CSS styles can be applied on inline SVG to handle these states.","Icon url: ",b);else{var d=a.getIcon(),e=this.Zl(a);e&&d&&(e.src=b||d)}};
k.Gb=function(a,b){var d=I.Fb(a),e=ql.Ph;b?C.w(d,e):C.O(d,e)};k.cW=function(a){var b=this.f().g(),d=I.la(b,ql.$S);for(a=a.X();null!=a&&a.id!=b;){if(a.id==d)return!0;a=a.parentNode}return!1};k.pp=function(){var a=this.f(),a=I.la(a.g(),ql.aT),a=q.b.getElementById(a);if(!a)return null;var a=a.parentNode,b=a.getAttribute(ql.Mf);null==b&&(b=a.parentNode.getAttribute(ql.Mf));return b};
k.In=function(a){var b=a.X();a=this.pp();for(var d=null!=a,e=this.i();b.parentNode&&(!d||a!=b.id);b=b.parentNode)if(b==e)return!0;return!1};k.Pja=function(){var a=this.i();"A"!=a.tagName&&(a=C.Ic(a,"a",0));a.setAttribute("aria-pressed","true")};k.yja=function(){var a=this.i();"A"!=a.tagName&&(a=C.Ic(a,"a",0));a.setAttribute("aria-pressed","false")};
k.Oja=function(){var a=this.i();"A"!=a.tagName&&(a=C.Ic(a,"a",0));var b="button"==a.getAttribute("role").toLowerCase()?"aria-pressed":"aria-checked";a.setAttribute(b,"true")};k.xja=function(){var a=this.i();"A"!=a.tagName&&(a=C.Ic(a,"a",0));var b="button"==a.getAttribute("role").toLowerCase()?"aria-pressed":"aria-checked";a.setAttribute(b,"false")};k.SG=function(){var a=this.i();"A"!=a.tagName&&(a=C.Ic(a,"a",0));a.setAttribute("aria-disabled","true")};
k.FG=function(){var a=this.i();"A"!=a.tagName&&(a=C.Ic(a,"a",0));a.removeAttribute("aria-disabled")};