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.
3 lines
6.3 KiB
3 lines
6.3 KiB
3 years ago
|
define ("theme_ilb/bootstrap/scrollspy",["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){"@babel/helpers - typeof";if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){e=function(a){return typeof a}}else{e=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return e(a)}function f(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);if(b)d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable});c.push.apply(c,d)}return c}function g(a){for(var b=1,c;b<arguments.length;b++){c=null!=arguments[b]?arguments[b]:{};if(b%2){f(Object(c),!0).forEach(function(b){h(a,b,c[b])})}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(a,Object.getOwnPropertyDescriptors(c))}else{f(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}}return a}function h(a,b,c){if(b in a){Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0})}else{a[b]=c}return a}function i(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function j(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 k(a,b,c){if(b)j(a.prototype,b);if(c)j(a,c);return a}var l="bs.scrollspy",m=".".concat(l),n=b.default.fn.scrollspy,o={offset:10,method:"auto",target:""},p={offset:"number",method:"string",target:"(string|element)"},q="activate".concat(m),r="scroll".concat(m),s="load".concat(m).concat(".data-api"),t="active",u=".nav, .list-group",v=".nav-link",w=".list-group-item",x="position",y=function(){function a(c,d){var e=this;i(this,a);this._element=c;this._scrollElement="BODY"===c.tagName?window:c;this._config=this._getConfig(d);this._selector="".concat(this._config.target," ").concat(v,",")+"".concat(this._config.target," ").concat(w,",")+"".concat(this._config.target," ").concat(".dropdown-item");this._offsets=[];this._targets=[];this._activeTarget=null;this._scrollHeight=0;(0,b.default)(this._scrollElement).on(r,function(a){return e._process(a)});this.refresh();this._process()}k(a,[{key:"refresh",value:function refresh(){var a=this,d=this._scrollElement===this._scrollElement.window?"offset":x,e="auto"===this._config.method?d:this._config.method,f=e===x?this._getScrollTop():0;this._offsets=[];this._targets=[];this._scrollHeight=this._getScrollHeight();var g=[].slice.call(document.querySelectorAll(this._selector));g.map(function(a){var d,g=c.default.getSelectorFromElement(a);if(g){d=document.querySelector(g)}if(d){var h=d.getBoundingClientRect();if(h.width||h.height){return[(0,b.default)(d)[e]().top+f,g]}}return null}).filter(function(a){return a}).sort(function(c,a){return c[0]-a[0]}).forEach(function(b){a._offsets.push(b[0]);a._targets.push(b[1])})}},{key:"dispose",value:function dispose(){b.default.removeData(this._element,l);(0,b.default)(this._scrollElement).off(m);this._element=null;this._scrollElement=null;this._config=null;this._selector=null;this._offsets=null;this._targets=null;this._activeTarget=null;this._scrollHeight=null}},{key:"_getConfig",value:function _getConfig(a){a=g({},o,{},"object"===e(a)&&a?a:{});if("string"!=typeof a.target&&c.default.isElement(a.target)){var d=(0,b.default)(a.target).attr("id");if(!d){d=c.default.getUID("scrollspy");(0,b.default)(a.target).attr("id",d)}a.target="#".concat(d)}c.default.typeCheckConfig("scrollspy",a,p);return a}},{key:"_getScrollTop",value:function _getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}},{key:"_getScrollHeight",value:function _getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}},{key:"_getOffsetHeight",value:function _getOffsetHeight(){return this._scrollElement===w
|
||
|
//# sourceMappingURL=scrollspy.min.js.map
|