PageSourceSearch

https://learn.fabric-testbed.net/wp-content/plugins/ht-knowledge-base/js/hkb-toc-scrollspy.min.js?ver=3.3.0

js fabric-testbed.net collected 2026-10-03 21:38:18 UTC 4,087 bytes, 1 lines download raw bytes

1!function(){return function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){return o(e[i][1][r]||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}}()({1:[function(require,module,exports){"use strict";var obj,_htScrollspy=(obj=require("./ht-scrollspy.js"))&&obj.__esModule?obj:{default:obj};window.onload=function(){var options={navMenu:"#navtoc",sectionClass:"h1, h2, h3, h4, h5, h6",menuActiveTarget:"li > a",viewOffset:window.hkbTOCSettings?parseInt(window.hkbTOCSettings.htTOCWidgetScollspyViewOffset):-200};new _htScrollspy.default(options)}},{"./ht-scrollspy.js":2}],2:[function(require,module,exports){"use strict";function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var HTScrollSpy=function(){function HTScrollSpy(){var options=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,HTScrollSpy);this.options=Object.assign({},{navMenu:"#nav",sectionClass:"h1, h2, h3, h4, h5, h6",navMenuActiveTarget:"li",viewOffset:0,hrefAttribute:"href",activeClass:"active"},options),this.navMenuList=this.options.navMenu instanceof HTMLElement?this.options.navMenu:document.querySelector(this.options.navMenu),this.sections=document.querySelectorAll(this.options.sectionClass),this.listenForScrollEvent()}var Constructor,protoProps,staticProps;return Constructor=HTScrollSpy,(protoProps=[{key:"listenForScrollEvent",value:function(){var _this=this;window&&window.addEventListener("scroll",function(){return _this.onScrollEvent()})}},{key:"setInitialActive",value:function(){var hashVal=window.location.hash.split("#").pop();if(!(hashVal.length<1)){var aElement=this.navMenuList.querySelector("[".concat(this.options.hrefAttribute,'="#').concat(hashVal,'"]'));if(aElement){var navMenuItem=aElement.parentNode;navMenuItem&&(this.removeCurrentActive({ignore:navMenuItem}),this.setActiveSection(navMenuItem))}}}},{key:"onScrollEvent",value:function(){var section=this.getSectionInView(),navMenuItem=this.getMenuItemBySection(section);navMenuItem&&(this.removeCurrentActive({ignore:navMenuItem}),this.setActiveSection(navMenuItem))}},{key:"getMenuItemBySection",value:function(section){if(section){var sectionId=section.getAttribute("id"),aElement=this.navMenuList.querySelector("[".concat(this.options.hrefAttribute,'="#').concat(sectionId,'"]'));return!!aElement&&aElement.parentNode}}},{key:"getSectionInView",value:function(){this.options.viewOffset;for(var i=0;i<this.sections.length;i++){if((this.sections[i].getBoundingClientRect().top||0)>=10+this.options.viewOffset)return i>0?this.sections[i-1]:this.sections[0]}}},{key:"setActiveSection",value:function(activeItem){var activeClass=this.options.activeClass;if(!1!==this.navMenuList.contains(activeItem)){activeItem.classList.contains(activeClass)||activeItem.classList.add(activeClass);var parent=activeItem.parentNode;parent&&this.setActiveSection(parent)}}},{key:"removeCurrentActive",value:function(_ref){var _this2=this,_this$options=(_ref.ignore,this.options),navMenuActiveTarget=(_this$options.hrefAttribute,_this$options.navMenuActiveTarget),items=(_this$options.activeClass,"".concat(navMenuActiveTarget));this.navMenuList.querySelectorAll(items).forEach(function(item){item.classList.remove(_this2.options.activeClass)})}}])&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),HTScrollSpy}();exports.default=HTScrollSpy},{}]},{},[1]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.