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.7 KiB

define ("theme_ilb/bootstrap/tab",["exports","jquery","./util"],function(a,b,c){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=void 0;b=d(b);c=d(c);function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function f(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 g(a,b,c){if(b)f(a.prototype,b);if(c)f(a,c);return a}var h="bs.tab",i=".".concat(h),j=b.default.fn.tab,k="hide".concat(i),l="hidden".concat(i),m="show".concat(i),n="shown".concat(i),o="click".concat(i).concat(".data-api"),p="active",q="fade",r="show",s=".active",t="> li > .active",u=function(){function a(b){e(this,a);this._element=b}g(a,[{key:"show",value:function show(){var a=this;if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&(0,b.default)(this._element).hasClass(p)||(0,b.default)(this._element).hasClass("disabled")){return}var d,e,f=(0,b.default)(this._element).closest(".nav, .list-group")[0],g=c.default.getSelectorFromElement(this._element);if(f){var o="UL"===f.nodeName||"OL"===f.nodeName?t:s;e=b.default.makeArray((0,b.default)(f).find(o));e=e[e.length-1]}var h=b.default.Event(k,{relatedTarget:this._element}),i=b.default.Event(m,{relatedTarget:e});if(e){(0,b.default)(e).trigger(h)}(0,b.default)(this._element).trigger(i);if(i.isDefaultPrevented()||h.isDefaultPrevented()){return}if(g){d=document.querySelector(g)}this._activate(this._element,f);var j=function(){var c=b.default.Event(l,{relatedTarget:a._element}),d=b.default.Event(n,{relatedTarget:e});(0,b.default)(e).trigger(c);(0,b.default)(a._element).trigger(d)};if(d){this._activate(d,d.parentNode,j)}else{j()}}},{key:"dispose",value:function dispose(){b.default.removeData(this._element,h);this._element=null}},{key:"_activate",value:function _activate(a,d,e){var f=this,g=d&&("UL"===d.nodeName||"OL"===d.nodeName)?(0,b.default)(d).find(t):(0,b.default)(d).children(s),h=g[0],i=e&&h&&(0,b.default)(h).hasClass(q),j=function(){return f._transitionComplete(a,h,e)};if(h&&i){var k=c.default.getTransitionDurationFromElement(h);(0,b.default)(h).removeClass(r).one(c.default.TRANSITION_END,j).emulateTransitionEnd(k)}else{j()}}},{key:"_transitionComplete",value:function _transitionComplete(a,d,e){if(d){(0,b.default)(d).removeClass(p);var f=(0,b.default)(d.parentNode).find("> .dropdown-menu .active")[0];if(f){(0,b.default)(f).removeClass(p)}if("tab"===d.getAttribute("role")){d.setAttribute("aria-selected",!1)}}(0,b.default)(a).addClass(p);if("tab"===a.getAttribute("role")){a.setAttribute("aria-selected",!0)}c.default.reflow(a);if(a.classList.contains(q)){a.classList.add(r)}if(a.parentNode&&(0,b.default)(a.parentNode).hasClass("dropdown-menu")){var g=(0,b.default)(a).closest(".dropdown")[0];if(g){var h=[].slice.call(g.querySelectorAll(".dropdown-toggle"));(0,b.default)(h).addClass(p)}a.setAttribute("aria-expanded",!0)}if(e){e()}}}],[{key:"_jQueryInterface",value:function _jQueryInterface(c){return this.each(function(){var d=(0,b.default)(this),e=d.data(h);if(!e){e=new a(this);d.data(h,e)}if("string"==typeof c){if("undefined"==typeof e[c]){throw new TypeError("No method named \"".concat(c,"\""))}e[c]()}})}},{key:"VERSION",get:function get(){return"4.6.0"}}]);return a}();(0,b.default)(document).on(o,"[data-toggle=\"tab\"], [data-toggle=\"pill\"], [data-toggle=\"list\"]",function(a){a.preventDefault();u._jQueryInterface.call((0,b.default)(this),"show")});b.default.fn.tab=u._jQueryInterface;b.default.fn.tab.Constructor=u;b.default.fn.tab.noConflict=function(){b.default.fn.tab=j;return u._jQueryInterface};a.default=u;return a.default});
//# sourceMappingURL=tab.min.js.map