{"size": 22769, "ext": "js", "max_stars_repo_path": "js/libs/oj/v4.0.0/min/ojbutton.js", "max_stars_repo_name": "amitghogale01/great_amitg", "max_stars_repo_stars_event_min_datetime": "2020-04-13T11:21:32.000Z", "max_stars_repo_stars_event_max_datetime": "2020-04-13T11:21:32.000Z", "max_issues_repo_path": "node_modules/@oracle/oraclejet/dist/js/libs/oj/min/ojbutton.js", "max_issues_repo_name": "eedorenko/ojetdevops", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "node_modules/@oracle/oraclejet/dist/js/libs/oj/min/ojbutton.js", "max_forks_repo_name": "eedorenko/ojetdevops", "max_forks_repo_forks_event_min_datetime": "2019-02-22T14:07:42.000Z", "max_forks_repo_forks_event_max_datetime": "2019-02-22T14:07:42.000Z"}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 421.6481481481, "max_line_length": 558, "alphanum_fraction": 0.6947604199}
/**
 * Copyright (c) 2014, 2017, Oracle and/or its affiliates.
 * The Universal Permissive License (UPL), Version 1.0
 */
"use strict";
/*
 Copyright 2013 jQuery Foundation and other contributors
 Released under the MIT license.
 http://jquery.org/license
*/
define(["ojs/ojcore","jquery","ojs/ojcomponentcore","ojs/ojoption"],function(a,g){(function(){function c(b,c,d){a:{for(var e=t[b],f=0;f<e.length;++f){var g=e[f];if(0<=d.indexOf(g))for(;;c=c.parentNode){var h=a.Components.ud(c,g);if(h){d=h;break a}}}d=null}return d?d("option","chroming"):(a.ic.Tc("oj-"+b+"-option-defaults")||{}).chroming}function b(a,b){var c=a.name,d=a.form;c?(c=c.replace(/'/g,"\\'"),c=":radio[name\x3d'"+c+"']:oj-button",d=b?b.filter(c):d?g(d).find(c):g(c,a.ownerDocument).filter(function(){return!this.form})):
d=(b?b.filter(a):g(a)).filter(":oj-button");return d}function d(a,b){a.removeClass(m).addClass(p[b])}a.ib("oj.ojButton",g.oj.baseComponent,{defaultElement:"\x3cbutton\x3e",widgetEventPrefix:"oj",options:{chroming:"full",disabled:!1,display:"all",label:null,icons:{start:null,end:null},menu:null},rh:function(a,b){this._super(a,b);this.Y()&&this.DQa();this.gNa();"disabled"in b||this.option("disabled",!!this.element.prop("disabled"),{_context:{ob:!0}});"label"in b||(this.a_a=!0,this.option("label","inputPush"===
this.type?this.sf.val():this.sf.html(),{_context:{ob:!0}}));this.Y()||!this.options.menu||b.icons&&void 0!==b.icons.end||this.option("icons.end","oj-component-icon oj-button-menu-dropdown-icon",{_context:{gd:!0,ob:!0}})},qc:function(){function b(){c.oc.removeClass(s);c.oc.removeClass("oj-hover");c.co()}this._super();this.eM=this.eventNamespace+"menu";this.hNa();this.E7=!!this.oc.attr("title");var c=this,k=this.fJ,s=k?"":"oj-active";this.oc.addClass(h);d(this.oc,this.options.chroming);this.sf.bind("touchstart"+
this.eventNamespace,function(){c.sh()||(c.oc.addClass(s),c.co(),c.document.one("touchend",b))}).bind("touchend"+this.eventNamespace+" touchcancel"+this.eventNamespace,b).bind("mouseenter"+this.eventNamespace,function(){c.sh()||a.T.oV()||(this===e&&c.oc.addClass("oj-active"),c.oc.addClass("oj-hover").removeClass("oj-default oj-focus-only"))}).bind("mouseleave"+this.eventNamespace,function(){c.oc.removeClass("oj-hover");c.sh()||(c.oc.removeClass(s),c.co())});this.w_=function(a){c.sh()&&(a.preventDefault(),
a.stopImmediatePropagation())};this.Y()?this.oc[0].addEventListener("click",this.w_,!0):this.sf[0].addEventListener("click",this.w_,!0);this._focusable({element:this.oc,applyHighlight:!0,afterToggle:function(){c.co()}});k&&(this.element.bind("change"+this.eventNamespace,function(a){c.SY(!0);var b=c.q0("buttonset"),d=b&&b.lha(b.Ke);b&&void 0!==d&&b.option("checked",d,{_context:{gd:!0,originalEvent:a,ob:!0}})}),this.sf.bind("mousedown"+this.eventNamespace,function(){c.sh()||(f=this,c.document.one("mouseup",
function(){f=null}))}).bind("mouseup"+this.eventNamespace,function(){c.sh()||this!==f||c.element.focus()}));"checkbox"===this.type?(this.sf.bind("click"+this.eventNamespace,function(){if(c.sh())return!1}),this.element.bind("keyup"+this.eventNamespace,function(a){a.keyCode===g.ui.keyCode.ENTER&&(c.sh()||c.element.click())})):"radio"===this.type?(this.sf.bind("click"+this.eventNamespace,function(){if(c.sh())return!1}),this.element.bind("keyup"+this.eventNamespace,function(a){a.keyCode!==g.ui.keyCode.ENTER||
c.element[0].checked||c.sh()||(c.element[0].checked=!0,c.element.change(),c.element.click())})):(this.sf.bind("mousedown"+this.eventNamespace,function(b){if(c.sh())return!1;1!==b.which||a.T.oV()||(c.oc.addClass("oj-active").removeClass("oj-default oj-focus-only"),e=this,c.document.one("mouseup",function(){e=null}))}).bind("mouseup"+this.eventNamespace,function(){if(c.sh())return!1;c.oc.removeClass("oj-active");c.co()}).bind("keydown"+this.eventNamespace,function(a){if(c.sh())return a.keyCode===g.ui.keyCode.TAB||
a.keyCode===g.ui.keyCode.LEFT||a.keyCode===g.ui.keyCode.RIGHT;var b=a.keyCode===g.ui.keyCode.SPACE,d="anchor"===c.type;d&&b&&a.preventDefault();(b&&!d||a.keyCode===g.ui.keyCode.ENTER)&&c.oc.addClass("oj-active").removeClass("oj-default oj-focus-only")}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){c.oc.removeClass("oj-active");c.co()}),"anchor"===this.type&&(k=this.sf.attr("tabindex"),(null===k||isNaN(k))&&this.sf.attr("tabindex","0")));this.options.disabled&&this.T2(!1,
!0);this.I5();k=c.q0("buttonset");this.Y()||k&&k.Y()?this.eK():this.$La();this.fpa(null);this.co()},Mi:function(a,b,c){this.Oi(b,c,{position:{of:"keyboard"===c?this.oc:b}})},DQa:function(){var b=this,c=this.element[0],d=c.parentNode,e="OJ-MENU-BUTTON"===d.tagName,f=a.J.lo(d),e=e?["startIcon","","endIcon","menu"]:["startIcon","","endIcon"];g.each(e,function(a,b){f[b]&&""!=b&&g.each(f[b],function(a,b){c.appendChild(b)})});g(d).children().not(c).not("[slot\x3d'contextMenu']").remove();var h=a.J.lo(c);
g.each(e,function(a,d){h[d]&&g.each(h[d],function(a,e){c.appendChild(e);if(""===d){var f=e;3===e.nodeType&&(f=document.createElement("span"),g(e).replaceWith(f),f.appendChild(e));g(f).addClass("oj-button-text");b.bpa(g(f))}else"startIcon"===d?(g(e).addClass("oj-button-icon"),g(e).addClass("oj-start")):"endIcon"===d?(g(e).addClass("oj-button-icon"),g(e).addClass("oj-end")):"menu"===d&&(g(e).uniqueId(),b.s_a="#"+e.id,void 0===h.endIcon&&(f=document.createElement("span"),f.className="oj-button-icon oj-end oj-component-icon oj-button-menu-dropdown-icon",
f.slot="endIcon",c.insertBefore(f,e)))})});d=g("\x3cdiv\x3e");d.addClass("oj-button-label");g(c).children().wrapAll(d)},bz:function(){return this.Y()?this.s_a:this.options.menu},gNa:function(){if(this.element.is("input[type\x3dcheckbox]"))this.type="checkbox",this.fJ=!0;else if(this.element.is("input[type\x3dradio]"))this.type="radio",this.fJ=!0;else if(this.element.is("input[type\x3dbutton],input[type\x3dsubmit],input[type\x3dreset]"))this.type="inputPush";else if(this.element.is("button"))this.type=
"button";else if(this.element.is("a"))this.type="anchor";else throw Error("JET Button not supported on this element type");if(this.fJ){var a="label[for\x3d'"+this.element.attr("id")+"']";this.sf=this.element.siblings().filter(a)}else this.sf=this.element},hNa:function(){this.fJ?(this.sf.addClass("oj-button-label"),this.element.addClass("oj-button-input oj-helper-hidden-accessible").attr("data-oj-internal","").add(this.sf).wrapAll("\x3cspan\x3e\x3c/span\x3e"),this.oc=this.element.parent(),this.oc.addClass("oj-button-jqui oj-button-toggle"),
this.element[0].checked&&this.oc.addClass("oj-selected").removeClass("oj-default oj-focus-only")):this.Y()?(this.oc=this.element.parent(),this.element.addClass("oj-button-button")):(this.oc=this.element,this.element.addClass("oj-button-jqui"))},widget:function(){return this.oc},_destroy:function(){this.yna(this.bz());this.sf[0].removeEventListener("click",this.w_,!0);this.element.removeClass("oj-helper-hidden-accessible").removeAttr("aria-labelledby").removeUniqueId();this.options.disabled&&this.T2(!0,
!1);var b=this.fJ;b||this.oc.removeClass(h+" oj-button-jqui "+k+" "+l+" "+m);this.sf.html(this.sf.find(".oj-button-text").html());b?(this.sf.removeClass("oj-button-label"),a.T.unwrap(this.element)):this.E7||this.oc.removeAttr("title");f===this.sf[0]&&(f=null)},uh:function(){this._super();this.co()},WG:function(a){this._super(a);this.I5()},I5:function(){var a=this.sh();this.oc.toggleClass("oj-disabled",a);this.oc.toggleClass("oj-enabled",!a);"anchor"!==this.type?(this.element.prop("disabled",a),this.oc.removeAttr("aria-disabled")):
(this.element.attr("aria-disabled",a),this.Y()&&this.oc.removeAttr("aria-disabled"));a?(this.widget().removeClass("oj-active oj-default oj-focus-only oj-hover oj-focus oj-focus-highlight"),e=null,this.y_(this.bz())):this.co()},_setOption:function(a,b,c){var e=this.options[a];this._super(a,b,c);switch(a){case "chroming":d(this.oc,b);break;case "disabled":this.T2(e,b);this.I5();break;case "label":this.nTa();break;case "display":"inputPush"!==this.type&&this.eK();break;case "icons":this.jTa(!0);break;
case "menu":this.fpa(e)}},refresh:function(){this._super();this.zda&&!this.OP("buttonset").length&&this.WG(!1);d(this.oc,this.options.chroming)},SY:function(a){"radio"===this.type?(a?b(this.element[0]):this.element).each(function(){var a=g(this).data("oj-ojButton");this.checked?a.oc.addClass("oj-selected").removeClass("oj-default oj-focus-only"):(a.oc.removeClass("oj-selected"),a.co())}):"checkbox"===this.type&&(this.element[0].checked?this.oc.addClass("oj-selected").removeClass("oj-default oj-focus-only"):
(this.oc.removeClass("oj-selected"),this.co()))},$La:function(){if("inputPush"===this.type)this.Loa();else{var a=this.mTa(),b=this.rS(!0),c=this.rS(!1);this.eK(a,b,c)}},mTa:function(){var a=this.sf,b=g("\x3cspan class\x3d'oj-button-text'\x3e\x3c/span\x3e",this.document[0]);this.a_a?b.append(a.contents()):(a.empty(),b.text(this.options.label));"button"===this.type?(a=g("\x3cdiv\x3e\x3c/div\x3e").addClass("oj-button-label"),a.append(b),this.element.append(a)):a.append(b);"button"!==this.type&&"anchor"!==
this.type||this.element[0].hasAttribute("aria-label")||this.element[0].hasAttribute("aria-labelledby")||this.bpa(b);return b},bpa:function(a){a.uniqueId();this.element.attr("aria-labelledby",a.attr("id"))},nTa:function(){if("inputPush"===this.type)this.Loa();else{var a=this.sf.find(".oj-button-text");a.text(this.options.label);this.eK(a)}},Loa:function(){this.options.label&&this.element.val(this.options.label)},jTa:function(){if("inputPush"!==this.type){var a=this.rS(!0),b=this.rS(!1);this.eK(void 0,
a,b)}},rS:function(a){var b=this.sf;"button"===this.type&&(b=this.element.children("div.oj-button-label"));if(a){var c=".oj-button-icon.oj-start";a="oj-button-icon oj-start";var d=this.options.icons.start,e="_lastStartIcon",f="prependTo"}else c=".oj-button-icon.oj-end",a="oj-button-icon oj-end",d=this.options.icons.end,e="_lastEndIcon",f="appendTo";c=b.find(c);d?(c.length?c.removeClass(this[e]):c=g("\x3cspan\x3e\x3c/span\x3e").addClass(a)[f](b),c.addClass(d)):c.remove();this[e]=d;return!!d},eK:function(a,
b,c){var d=this.sf.children(".oj-button-label");d.length||(d=this.q0("buttonset"),d=this.Y()||d&&d.Y()?this.sf.children("oj-option"):this.sf);void 0===a&&(a=d.children(".oj-button-text"));void 0===b&&(b=!!this.options.icons.start||d.children("[slot\x3d'startIcon']").length);void 0===c&&(c=!!this.options.icons.end||d.children("[slot\x3d'endIcon']").length);d=b&&c;c=b||c;var e="icons"===this.options.display;c&&e?(a.addClass("oj-helper-hidden-accessible"),this.E7||(a=a.text(),this.oc.attr("title",g.trim(a)))):
(a.removeClass("oj-helper-hidden-accessible"),this.E7||this.oc.removeAttr("title"));b=c?e?d?"oj-button-icons-only":"oj-button-icon-only":d?"oj-button-text-icons":b?"oj-button-text-icon-start":"oj-button-text-icon-end":"oj-button-text-only";this.oc.removeClass(l).addClass(b)},T2:function(a,b){if(!a!=!b&&"anchor"===this.type&&!this.OP("buttonset").length&&!this.OP("toolbar").length)if(b){var c=this.element.attr("tabindex");this.qma=this.gOa(Number(c))?c:null;this.element.attr("tabindex",-1)}else null==
this.qma?this.element.removeAttr("tabindex"):this.element.attr("tabindex",this.qma)},gOa:function(a){return"number"===typeof a&&isFinite(a)&&Math.floor(a)===a},NSa:{buttonset:".oj-buttonset",toolbar:".oj-toolbar"},uFa:{buttonset:"ojButtonset",toolbar:"ojToolbar"},OP:function(a){return this.oc.closest(this.NSa[a])},q0:function(b){var c=this.OP(b)[0];return(b=a.Components.ud(c,this.uFa[b]))&&b("instance")},fpa:function(a){if(this.bz()&&this.element.is("input"))throw Error("Menu Button functionality is not supported on input elements.");
this.yna(a);if(this.bz()){var b=this;this.element.attr("aria-haspopup",!0).on("keydown"+this.eM,function(a){if(a.which===g.ui.keyCode.DOWN)b.opa(a,"firstItem"),a.preventDefault();else if(a.which===g.ui.keyCode.ESCAPE){var c=!b.oc.hasClass("oj-selected");b.y_(b.bz(),a);return c}return!0}).on("click"+this.eM,function(a){var c=b.mia();c.wO||b.opa(a,"firstItem");c.wO=!1;a.preventDefault();return!0})}},yna:function(a){this.element.removeAttr("aria-haspopup").off(this.eM);this.y_(a);g(a).off(this.eM);this.Wla=
!1},mia:function(){var a=this.nia(this.bz());if(!a)throw Error('JET Button: "menu" option specified, but does not reference a valid JET Menu.');if(!this.Wla){var b=this,c=this.Y()?"ojClose":"ojclose";a.widget().on(c+this.eM,function(a){b.hPa(a)});this.Wla=!0}return a},nia:function(b){return(b=a.Components.ud(g(b)[0],"ojMenu"))&&b("instance")},opa:function(a,b){if(!this.sh()){var c=this.mia(),d=c.widget();c.open(a,{launcher:this.element,initialFocus:b});d.is(":visible")&&(this.Yla=!0,d.attr("aria-label")||
d.attr("aria-labelledby")||(this.element.uniqueId(),this.soa=!0,d.attr("aria-labelledby",this.element.attr("id"))),this.oc.addClass("oj-selected").removeClass("oj-default oj-focus-only"))}},y_:function(a,b){if(this.Yla){var c=this.nia(a);c&&(c.uO(b,!0),c.iv(b))}},hPa:function(){this.soa&&(g(this.bz()).removeAttr("aria-labelledby"),this.soa=!1);this.oc.removeClass("oj-selected");this.co();this.Yla=!1},co:function(){var a,b;this.oc.is(".oj-hover, .oj-active, .oj-selected, .oj-disabled")?b=a=!1:(b=this.oc.is(".oj-focus"),
a=!b);this.oc.toggleClass("oj-default",a);this.oc.toggleClass("oj-focus-only",b)}});a.ib("oj.ojButtonset",g.oj.baseComponent,{H2:"button, input[type\x3dbutton], input[type\x3dsubmit], input[type\x3dreset], input[type\x3dcheckbox], input[type\x3dradio], a",widgetEventPrefix:"oj",options:{checked:null,chroming:"full",display:"all",focusManagement:"oneTabstop"},bK:function(a,b){var c=g.type(a),d;if((d="OJ-BUTTONSET-MANY"===this.element[0].tagName||0<b.length&&b.filter("input[type\x3dcheckbox]").length===
b.length)&&"array"!=c)throw Error("Invalid 'checked' value set on JET Buttonset: "+a);if(!d&&0<b.length){var e=b[0].name;(e||1>=b.length)&&b.filter("input[type\x3dradio][name\x3d"+e+"]")}c=this.RSa(a,b,c,d);if(!c&&null!==a)throw Error("Invalid 'checked' value set on JET Buttonset: "+a);},RSa:function(a,b,c,d){c=this.ZTa(a,b,d);this.aUa(a,d,c)&&(c=this.EGa(a,b,d,c));return d?c===a.length:1===c},ZTa:function(a,b,c){var d=this,e=0;b.each(function(){var b=d.y0(this);(c?-1<a.indexOf(b):b===a)?(this.checked=
!0,e++):this.checked=!1});return e},aUa:function(a,b,c){return b?c!==a.length:!c},EGa:function(a,b,c,d){var e=this;b.each(function(){var b=e.y0(this);if(c)for(var f=0;f<a.length;f++)e.Jfa(b,a[f])&&(this.checked=!0,d++);else e.Jfa(b,a)&&(this.checked=!0,d++)});return d},Jfa:function(b,c){return"object"==g.type(b)&&b.ojCompareValues?0===b.ojCompareValues(b,c):a.f.Nb(b,c)},y0:function(a){return this.Y()?this.KJa(a).value:a.value},KJa:function(a){return g(a).prev().children()[0]},lha:function(a){var b=
void 0,c=null,d=null,e=this;a.each(function(){if("input"!==this.tagName.toLowerCase())return b=void 0,!1;var a=this.type.toLowerCase(),f;if("radio"===a)a=!0,f=this.name.toLowerCase();else if("checkbox"===a)a=!1,f=null;else return b=void 0,!1;if(void 0!==b&&(a!==c||f!==d||c&&!d))return b=void 0,!1;var g=e.y0(this);void 0===b?(b=a?this.checked?g:null:this.checked?[g]:[],c=a,d=f):this.checked&&(c?b=g:b.push(g))});return b},kl:function(a,b,c){return"checked"===a?b===c?!0:"array"===g.type(b)&&"array"===
g.type(c)&&this.kFa(b,c):this._superApply(arguments)},kFa:function(a,b){return!a.some(function(a){return 0>b.indexOf(a)})&&!b.some(function(b){return 0>a.indexOf(b)})},IRa:function(){this.element.children(":not(oj-option)").remove()},qr:function(){var a=this,b=this.element.find("oj-option");g.each(b,function(b,c){c.customOptionRenderer=a.Uq.bind(a)})},Uq:function(a){this.KRa(a);this.hDa(a)},hDa:function(a){var b=g(a);this.gDa(a);var c="OJ-BUTTONSET-ONE"===this.element[0].tagName,d=c?"radio":"checkbox",
e=a.value,f=a.disabled;a=g("\x3cinput\x3e");var h=g("\x3clabel\x3e");a.uniqueId();a.prop("value",e);a.prop("type",d);a.prop("disabled",f);d=a[0].id;h.prop("for",d);c&&(this.Dg||(this.Dg="_n_"+d),a.prop("name",this.Dg));b.before(h);h.append(b);h.after(a);g(this.element).hasClass("oj-buttonset")&&(this.Ke=this.element.find(this.H2),this.sb(!1))},KRa:function(a){var b=g(a).parent();if("LABEL"===b.prop("tagName")){this.JRa(a);var c=b.siblings(".oj-button-input");c.ojButton("destroy");c.removeUniqueId();
c.remove();b.replaceWith(a)}},gDa:function(b){var c=a.J.lo(b);b=c[""]?c[""]:null;var d=c.startIcon?c.startIcon[0]:null,c=c.endIcon?c.endIcon[0]:null;d&&(g(d).addClass("oj-button-icon"),g(d).addClass("oj-start"));if(b)for(d=0;d<b.length;d++){var e=b[d],f=e;3===e.nodeType&&(f=g("\x3cspan\x3e"),g(e).replaceWith(f),f.append(e));g(f).addClass("oj-button-text")}c&&(g(c).addClass("oj-button-icon"),g(c).addClass("oj-end"))},JRa:function(b){var c=a.J.lo(b);b=c[""]?c[""]:null;var d=c.startIcon?c.startIcon[0]:
null,c=c.endIcon?c.endIcon[0]:null;d&&(g(d).removeClass("oj-button-icon"),g(d).removeClass("oj-start"));if(b)for(d=0;d<b.length;d++)g(b[d]).removeClass("oj-button-text");c&&(g(c).removeClass("oj-button-icon"),g(c).removeClass("oj-end"))},rh:function(a,b){this._super(a,b);this.Y()&&(this.IRa(),this.qr());this.Ke=this.element.find(this.H2);if(!("checked"in b)){this.H7=!0;var c=this.lha(this.Ke);if("array"===g.type(c)||"OJ-BUTTONSET-MANY"===this.element[0].tagName)this.options.checked=[];void 0!==c&&
this.option("checked",c,{_context:{ob:!0}})}},qc:function(){this._super();this.element.attr(a.Components.Dq,this.widgetName).addClass("oj-buttonset oj-component");this.Yoa(this.options.focusManagement);this.sb(!0)},Mi:function(a,b,c){a=this.element.find(":oj-button[tabindex\x3d0]");this.Oi(b,c,{launcher:a,position:{of:"keyboard"===c?a.ojButton("widget"):b}})},ow:function(a){a=!!a;this.Ke.each(function(){g(this).data("oj-ojButton").WG(a)})},Yoa:function(a){"oneTabstop"===a?this.element.attr("role",
"toolbar"):this.element.removeAttr("role")},_setOption:function(a,b,c){this._superApply(arguments);"disabled"===a?this.ow(b):"checked"===a?(this.bK(b,this.Ke),this.Ke.each(function(){g(this).data("oj-ojButton").SY(!1)})):"focusManagement"===a?this.Yoa(b):"chroming"===a?(d(this.element,b),this.Ke.ojButton("refresh")):"display"===a&&this.Ke.ojButton("option",a,b)},refresh:function(){this._super();this.Y()&&this.qr();this.sb(!1)},sb:function(a){var b=this;this.hn="rtl"===this.Qc();d(this.element,this.options.chroming);
(a&&!this.H7||this.Y())&&this.bK(this.options.checked,this.Ke);a||(this.Ke=this.element.find(this.H2));this.element.toggleClass("oj-buttonset-multi",1<this.Ke.length);this.Ke.filter(":oj-button").ojButton("refresh").each(function(){g(this).data("oj-ojButton").SY(!1)}).end().not(":oj-button").ojButton({display:this.options.display}).end().map(function(){return g(this).ojButton("widget")[0]}).removeClass("oj-buttonset-first oj-buttonset-last").filter(":first").addClass("oj-buttonset-first").end().filter(":last").addClass("oj-buttonset-last").end().end();
this.ow(this.options.disabled);"oneTabstop"===this.options.focusManagement&&(this.Ke.unbind("keydown"+this.eventNamespace).bind("keydown"+this.eventNamespace,function(a){b.hr(a,g(this))}).unbind("click"+this.eventNamespace).bind("click"+this.eventNamespace,function(){g(this).data("oj-ojButton").sh()||b.tw(g(this))}).unbind("focus"+this.eventNamespace).bind("focus"+this.eventNamespace,function(){b.tw(g(this))}),this.al=this.Ke.filter(function(){return!g(this).data("oj-ojButton").sh()}),this.TQ(a))},
TQ:function(a){var b=g(this.Et);this.Et=void 0;this.Ke.attr("tabindex","-1");a=a||!b.is(this.al)?this.al.first():b;this.tw(a)},tR:function(a){var c=this.al;return a.map(function(a,d){if("radio"!=d.type||d.checked||""==d.name)return d;var e=b(d,c).filter(":checked");return e.length?e[0]:d})},tw:function(a){a=this.tR(a);var b=a[0],c=this.Et;b!==c&&(g(c).attr("tabindex","-1"),a.attr("tabindex","0"),this.Et=b)},hr:function(a,b){switch(a.which){case g.ui.keyCode.UP:case g.ui.keyCode.DOWN:if("radio"!=b.attr("type"))break;
case g.ui.keyCode.LEFT:case g.ui.keyCode.RIGHT:a.preventDefault();var c=this.al,d=c.length;if(2>d)break;var e=c.index(b);c.eq((e+(a.which==g.ui.keyCode.DOWN||a.which==g.ui.keyCode.RIGHT^this.hn?1:-1)+d)%d).focus()}},_destroy:function(){this.element.removeClass("oj-buttonset oj-component "+m).removeAttr(a.Components.Dq).removeAttr("role");"oneTabstop"===this.options.focusManagement&&this.Ke.attr("tabindex","0");this.Ke.map(function(){return g(this).ojButton("widget")[0]}).removeClass("oj-buttonset-first oj-buttonset-last").end().ojButton("destroy")}});
var e,f,h="oj-button oj-component oj-enabled oj-default",k="oj-hover oj-active oj-selected",l="oj-button-icons-only oj-button-icon-only oj-button-text-icons oj-button-text-icon-start oj-button-text-icon-end oj-button-text-only",m="oj-button-full-chrome oj-button-half-chrome oj-button-outlined-chrome",p={full:"oj-button-full-chrome",half:"oj-button-half-chrome",outlined:"oj-button-outlined-chrome"},t={button:["ojButtonset","ojToolbar"],buttonset:["ojToolbar"]};a.Components.gq({ojButton:{chroming:a.Components.tf(function(a){return c("button",
a.element,a.containers)})},ojButtonset:{chroming:a.Components.tf(function(a){return c("buttonset",a.element,a.containers)})}})})();(function(){a.J.$a("oj-button","baseComponent",{properties:{chroming:{type:"string",enumValues:["full","half","outlined"]},disabled:{type:"boolean"},display:{type:"string",enumValues:["all","icons"]},href:{type:"string",extension:{nj:!0}}},extension:{Ya:"ojButton"}});a.J.register("oj-button",{metadata:a.J.getMetadata("oj-button"),innerDomFunction:function(a){return a.getAttribute("href")?
"a":"button"}})})();(function(){a.J.$a("oj-menu-button","baseComponent",{properties:{chroming:{type:"string",enumValues:["full","half","outlined"]},disabled:{type:"boolean"},display:{type:"string",enumValues:["all","icons"]},href:{type:"string",extension:{nj:!0}}},extension:{Ya:"ojButton"}});a.J.register("oj-menu-button",{metadata:a.J.getMetadata("oj-menu-button"),innerDomFunction:function(a){return a.getAttribute("href")?"a":"button"}})})();a.J.$a("oj-buttonset-one","baseComponent",{properties:{chroming:{type:"string",
enumValues:["full","half","outlined"]},disabled:{type:"boolean"},display:{type:"string",enumValues:["all","icons"]},focusManagement:{type:"string",enumValues:["oneTabstop","none"]},value:{type:"any",writeback:!0}},extension:{Ya:"ojButtonset",Gs:{value:"checked"}}});a.J.register("oj-buttonset-one",{metadata:a.J.getMetadata("oj-buttonset-one")});a.J.$a("oj-buttonset-many","baseComponent",{properties:{chroming:{type:"string",enumValues:["full","half","outlined"]},disabled:{type:"boolean"},display:{type:"string",
enumValues:["all","icons"]},focusManagement:{type:"string",enumValues:["oneTabstop","none"]},value:{type:"Array",writeback:!0}},extension:{Ya:"ojButtonset",Gs:{value:"checked"}}});a.J.register("oj-buttonset-many",{metadata:a.J.getMetadata("oj-buttonset-many")})});