X7ROOT File Manager
Current Path:
/home/notabjze/narcev.com/media/vendor/bootstrap/js
home
/
notabjze
/
narcev.com
/
media
/
vendor
/
bootstrap
/
js
/
ðŸ“
..
📄
alert.js
(3.43 KB)
📄
alert.min.js
(1.54 KB)
📄
alert.min.js.gz
(745 B)
📄
bootstrap-es5.js
(351.6 KB)
📄
bootstrap-es5.min.js
(128.65 KB)
📄
bootstrap-es5.min.js.gz
(40.08 KB)
📄
button.js
(2.63 KB)
📄
button.min.js
(1.05 KB)
📄
button.min.js.gz
(576 B)
📄
carousel.js
(16.9 KB)
📄
carousel.min.js
(9.58 KB)
📄
carousel.min.js.gz
(3.03 KB)
📄
collapse.js
(10.57 KB)
📄
collapse.min.js
(5.7 KB)
📄
collapse.min.js.gz
(1.9 KB)
📄
dom.js
(23.64 KB)
📄
dom.min.js
(10.22 KB)
📄
dom.min.js.gz
(3.92 KB)
📄
dropdown.js
(15.03 KB)
📄
dropdown.min.js
(8.42 KB)
📄
dropdown.min.js.gz
(2.89 KB)
📄
modal.js
(23.12 KB)
📄
modal.min.js
(12.25 KB)
📄
modal.min.js.gz
(3.68 KB)
📄
offcanvas.js
(7.62 KB)
📄
offcanvas.min.js
(4.44 KB)
📄
offcanvas.min.js.gz
(1.61 KB)
📄
popover.js
(28.21 KB)
📄
popover.min.js
(16.15 KB)
📄
popover.min.js.gz
(4.88 KB)
📄
popper.js
(55.77 KB)
📄
popper.min.js
(23.09 KB)
📄
popper.min.js.gz
(7.28 KB)
📄
scrollspy.js
(8.69 KB)
📄
scrollspy.min.js
(4.89 KB)
📄
scrollspy.min.js.gz
(1.82 KB)
📄
tab.js
(8.08 KB)
📄
tab.min.js
(4.12 KB)
📄
tab.min.js.gz
(1.61 KB)
📄
toast.js
(6.4 KB)
📄
toast.min.js
(3.68 KB)
📄
toast.min.js.gz
(1.3 KB)
Editing: scrollspy.min.js
import{B as BaseComponent,E as EventHandler,S as SelectorEngine,e as getSelectorFromElement,M as Manipulator,j as isElement,o as getUID,a as typeCheckConfig,d as defineJQueryPlugin}from"./dom.min.js?1629745661";const NAME="scrollspy",DATA_KEY="bs.scrollspy",EVENT_KEY=`.${DATA_KEY}`,DATA_API_KEY=".data-api",Default={offset:10,method:"auto",target:""},DefaultType={offset:"number",method:"string",target:"(string|element)"},EVENT_ACTIVATE=`activate${EVENT_KEY}`,EVENT_SCROLL=`scroll${EVENT_KEY}`,EVENT_LOAD_DATA_API=`load${EVENT_KEY}.data-api`,CLASS_NAME_DROPDOWN_ITEM="dropdown-item",CLASS_NAME_ACTIVE="active",SELECTOR_DATA_SPY='[data-bs-spy="scroll"]',SELECTOR_NAV_LIST_GROUP=".nav, .list-group",SELECTOR_NAV_LINKS=".nav-link",SELECTOR_NAV_ITEMS=".nav-item",SELECTOR_LIST_ITEMS=".list-group-item",SELECTOR_DROPDOWN=".dropdown",SELECTOR_DROPDOWN_TOGGLE=".dropdown-toggle",METHOD_OFFSET="offset",METHOD_POSITION="position";class ScrollSpy extends BaseComponent{constructor(t,e){super(t),this._scrollElement="BODY"===this._element.tagName?window:this._element,this._config=this._getConfig(e),this._selector=`${this._config.target} .nav-link, ${this._config.target} .list-group-item, ${this._config.target} .dropdown-item`,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,EventHandler.on(this._scrollElement,EVENT_SCROLL,(()=>this._process())),this.refresh(),this._process()}static get Default(){return Default}static get NAME(){return NAME}refresh(){const t=this._scrollElement===this._scrollElement.window?"offset":"position",e="auto"===this._config.method?t:this._config.method,s="position"===e?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight();SelectorEngine.find(this._selector).map((t=>{const o=getSelectorFromElement(t),i=o?SelectorEngine.findOne(o):null;if(i){const t=i.getBoundingClientRect();if(t.width||t.height)return[Manipulator[e](i).top+s,o]}return null})).filter((t=>t)).sort(((t,e)=>t[0]-e[0])).forEach((t=>{this._offsets.push(t[0]),this._targets.push(t[1])}))}dispose(){EventHandler.off(this._scrollElement,EVENT_KEY),super.dispose()}_getConfig(t){if("string"!=typeof(t={...Default,...Manipulator.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}}).target&&isElement(t.target)){let{id:e}=t.target;e||(e=getUID(NAME),t.target.id=e),t.target=`#${e}`}return typeCheckConfig(NAME,t,DefaultType),t}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),s=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=s){const t=this._targets[this._targets.length-1];this._activeTarget!==t&&this._activate(t)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(let e=this._offsets.length;e--;){this._activeTarget!==this._targets[e]&&t>=this._offsets[e]&&(void 0===this._offsets[e+1]||t<this._offsets[e+1])&&this._activate(this._targets[e])}}}_activate(t){this._activeTarget=t,this._clear();const e=this._selector.split(",").map((e=>`${e}[data-bs-target="${t}"],${e}[href="${t}"]`)),s=SelectorEngine.findOne(e.join(","));s.classList.contains("dropdown-item")?(SelectorEngine.findOne(".dropdown-toggle",s.closest(".dropdown")).classList.add("active"),s.classList.add("active")):(s.classList.add("active"),SelectorEngine.parents(s,".nav, .list-group").forEach((t=>{SelectorEngine.prev(t,".nav-link, .list-group-item").forEach((t=>t.classList.add("active"))),SelectorEngine.prev(t,".nav-item").forEach((t=>{SelectorEngine.children(t,".nav-link").forEach((t=>t.classList.add("active")))}))}))),EventHandler.trigger(this._scrollElement,EVENT_ACTIVATE,{relatedTarget:t})}_clear(){SelectorEngine.find(this._selector).filter((t=>t.classList.contains("active"))).forEach((t=>t.classList.remove("active")))}static jQueryInterface(t){return this.each((function(){const e=ScrollSpy.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}if(EventHandler.on(window,EVENT_LOAD_DATA_API,(()=>{SelectorEngine.find(SELECTOR_DATA_SPY).forEach((t=>new ScrollSpy(t)))})),defineJQueryPlugin(ScrollSpy),window.bootstrap=window.bootstrap||{},window.bootstrap.Scrollspy=ScrollSpy,Joomla&&Joomla.getOptions){const t=Joomla.getOptions("bootstrap.scrollspy");"object"==typeof t&&null!==t&&Object.keys(t).forEach((e=>{const s=t[e],o={offset:s.offset?s.offset:10,method:s.method?s.method:"auto"};s.target&&(o.target=s.target);const i=Array.from(document.querySelectorAll(e));i.length&&i.map((t=>new window.bootstrap.Scrollspy(t,o)))}))}export{ScrollSpy as S};
Upload File
Create Folder