var sl=I.ea(I,"AdfDhtmlButtonPeer");m("AdfDhtmlButtonPeer",sl);sl.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.Sfa="popup";this.Mf="_afrPopId";this.jS="_afrGrp";this.Ph="p_AFDepressed";this.Mj="p_AFSelected";this.df="_busy"};m("AdfDhtmlButtonPeer.InitSubclass",sl.C);
sl.prototype.tb=function(a,b){sl.h.tb.call(this,a,b);this.dF=C.sa(b,"p_AFActionDisabled")};r.a("AdfDhtmlButtonPeer.prototype.BindToComponent",{tb:sl.prototype.tb});sl.prototype.ma=function(a){if(!a.Aa()){var b=a.na();if(this.In(a)){var d=this.qp(),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),tl(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:sl.prototype.ma});sl.prototype.M=function(a){if(a.ec()&&!this.dF&&!this.cW(a)&&this.In(a)){var b=this.f(),d=b.K(sl.df);b.getDisabled()||d||(null!=this.f().getDestination()?(this.K4(a),tl(this,b)):this.J4())}};r.a("AdfDhtmlButtonPeer.prototype.HandleComponentClick",{M:sl.prototype.M});sl.prototype.$a=function(a){!this.f().getDisabled()&&this.In(a)&&this.Vl(this.f())};r.a("AdfDhtmlButtonPeer.prototype.HandleComponentMouseOver",{$a:sl.prototype.$a});
sl.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.Ei(b)))};r.a("AdfDhtmlButtonPeer.prototype.HandleComponentMouseOut",{fc:sl.prototype.fc});sl.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:sl.prototype.Ac});
sl.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.qp(),this.PW(b,!1,a))};r.a("AdfDhtmlButtonPeer.prototype.HandleComponentMouseDown",{Fa:sl.prototype.Fa});sl.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.Ei(a),this.FG(a),e.setAttribute(J.Hh,"true"))};
r.a("AdfDhtmlButtonPeer.prototype.ComponentDisabledChanged",{we:sl.prototype.we});sl.prototype.zq=function(a,b,d){var e=a.getType();d?(this.Gb(a,!0),C.w(b,sl.Mj),this.Ul(a),"radio"==e&&(this.UB(),this.Rja(a)),"check"==e&&this.Sja(a)):(this.Gb(a,!1),C.O(b,sl.Mj),this.Ei(a),"radio"==e&&this.Aja(a),"check"==e&&this.Bja(a))};r.a("AdfDhtmlButtonPeer.prototype.ComponentSelectedChanged",{zq:sl.prototype.zq});
sl.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:sl.prototype.Cz});sl.prototype.Jg=C.YE;sl.prototype.Oa=function(){return ji.jd()};r.a("AdfDhtmlButtonPeer.prototype.GetInlineEditor",{Oa:sl.prototype.Oa});
sl.prototype.sc=function(a,b){var d=I.j(a.g(),sl.$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:sl.prototype.sc});sl.prototype.ob=function(a,b,d){sl.h.ob.call(this,a,b);a=a.g();d==a&&(d=I.la(a,sl.ZS),(d=q.b.getElementById(d))&&d.appendChild(b))};r.a("AdfDhtmlButtonPeer.prototype.PopupClosed",{ob:sl.prototype.ob});
sl.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(sl.df,a,!1,G.ud))};r.a("AdfDhtmlButtonPeer.prototype.SetBusy",{vd:sl.prototype.vd});sl.prototype.td=function(){var a=this.f();return a&&a.K(sl.df)};r.a("AdfDhtmlButtonPeer.prototype.isBusy",{td:sl.prototype.td});sl.prototype.bd=function(a){this.bind(a);a=this.bf(a);var b=null!=a?a.o():null;b&&b.bd&&b.bd(a)};r.a("AdfDhtmlButtonPeer.prototype.__preferredSizeChangeNotify",{bd:sl.prototype.bd});
k=sl.prototype;k.J4=function(){var a=this.f(),b=new ab(a);b.F(a.getPartialSubmit());b.Aa()||tl(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 tl(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,sl.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,sl.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,sl.Sfa);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.jx(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.jx(g);b==g&&f!=a&&f.getType&&"radio"==f.getType()&&this.mpa(f)}a.setSelected(!0)};k.jx=function(a){return a.getAttribute(sl.jS)};k.mpa=function(a){a.setSelected(!1);this.Gb(a,!1);this.Ei(a)};k.Zl=function(a){a=a.g();a=I.la(a,"icon");return q.b.getElementById(a)};k.Ei=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.yo(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=sl.Ph;b?C.w(d,e):C.O(d,e)};k.cW=function(a){var b=this.f().g(),d=I.la(b,sl.$S);for(a=a.X();null!=a&&a.id!=b;){if(a.id==d)return!0;a=a.parentNode}return!1};k.qp=function(){var a=this.f(),a=I.la(a.g(),sl.aT),a=q.b.getElementById(a);if(!a)return null;var a=a.parentNode,b=a.getAttribute(sl.Mf);null==b&&(b=a.parentNode.getAttribute(sl.Mf));return b};
k.In=function(a){var b=a.X();a=this.qp();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.Sja=function(){var a=this.i();"A"!=a.tagName&&(a=C.Ic(a,"a",0));a.setAttribute("aria-pressed","true")};k.Bja=function(){var a=this.i();"A"!=a.tagName&&(a=C.Ic(a,"a",0));a.setAttribute("aria-pressed","false")};
k.Rja=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.Aja=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")};