You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

2 lines
3.2 KiB

define ("theme_ilb/bootstrap/button",["exports","jquery"],function(a,b){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=void 0;b=function(a){return a&&a.__esModule?a:{default:a}}(b);function c(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function d(a,b){for(var c=0,d;c<b.length;c++){d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;if("value"in d)d.writable=!0;Object.defineProperty(a,d.key,d)}}function e(a,b,c){if(b)d(a.prototype,b);if(c)d(a,c);return a}var f="bs.button",g=".".concat(f),h=".data-api",i=b.default.fn.button,j="active",k="[data-toggle^=\"button\"]",l="input:not([type=\"hidden\"])",m=".btn",n="click".concat(g).concat(h),o="focus".concat(g).concat(h," ")+"blur".concat(g).concat(h),p="load".concat(g).concat(h),q=function(){function a(b){c(this,a);this._element=b;this.shouldAvoidTriggerChange=!1}e(a,[{key:"toggle",value:function toggle(){var a=!0,c=!0,d=(0,b.default)(this._element).closest("[data-toggle=\"buttons\"]")[0];if(d){var e=this._element.querySelector(l);if(e){if("radio"===e.type){if(e.checked&&this._element.classList.contains(j)){a=!1}else{var f=d.querySelector(".active");if(f){(0,b.default)(f).removeClass(j)}}}if(a){if("checkbox"===e.type||"radio"===e.type){e.checked=!this._element.classList.contains(j)}if(!this.shouldAvoidTriggerChange){(0,b.default)(e).trigger("change")}}e.focus();c=!1}}if(!(this._element.hasAttribute("disabled")||this._element.classList.contains("disabled"))){if(c){this._element.setAttribute("aria-pressed",!this._element.classList.contains(j))}if(a){(0,b.default)(this._element).toggleClass(j)}}}},{key:"dispose",value:function dispose(){b.default.removeData(this._element,f);this._element=null}}],[{key:"_jQueryInterface",value:function _jQueryInterface(c,d){return this.each(function(){var e=(0,b.default)(this),g=e.data(f);if(!g){g=new a(this);e.data(f,g)}g.shouldAvoidTriggerChange=d;if("toggle"===c){g[c]()}})}},{key:"VERSION",get:function get(){return"4.6.0"}}]);return a}();(0,b.default)(document).on(n,k,function(a){var c=a.target,d=c;if(!(0,b.default)(c).hasClass("btn")){c=(0,b.default)(c).closest(m)[0]}if(!c||c.hasAttribute("disabled")||c.classList.contains("disabled")){a.preventDefault()}else{var e=c.querySelector(l);if(e&&(e.hasAttribute("disabled")||e.classList.contains("disabled"))){a.preventDefault();return}if("INPUT"===d.tagName||"LABEL"!==c.tagName){q._jQueryInterface.call((0,b.default)(c),"toggle","INPUT"===d.tagName)}}}).on(o,k,function(a){var c=(0,b.default)(a.target).closest(m)[0];(0,b.default)(c).toggleClass("focus",/^focus(in)?$/.test(a.type))});(0,b.default)(window).on(p,function(){for(var a=[].slice.call(document.querySelectorAll("[data-toggle=\"buttons\"] .btn")),b=0,c=a.length;b<c;b++){var d=a[b],e=d.querySelector(l);if(e.checked||e.hasAttribute("checked")){d.classList.add(j)}else{d.classList.remove(j)}}a=[].slice.call(document.querySelectorAll("[data-toggle=\"button\"]"));for(var f=0,g=a.length,h;f<g;f++){h=a[f];if("true"===h.getAttribute("aria-pressed")){h.classList.add(j)}else{h.classList.remove(j)}}});b.default.fn.button=q._jQueryInterface;b.default.fn.button.Constructor=q;b.default.fn.button.noConflict=function(){b.default.fn.button=i;return q._jQueryInterface};a.default=q;return a.default});
//# sourceMappingURL=button.min.js.map