PageSourceSearch

https://www.luxewall.com/cdn/shop/t/37/assets/nested-menu.js?v=59797003545283775281732221485

js luxewall.com collected 2026-10-06 18:46:45 UTC 3,506 bytes, 2 lines download raw bytes

1class NestedMenu extends HTMLElement{constructor(){super(),this.menu=this.querySelector("ul"),this.rows=Array.from(this.menu.querySelectorAll(":scope > li")),this.submenus=Array.from(this.menu.querySelectorAll(":scope > li > header-details-disclosure")),this.tolerance=this.getAttribute("tolerance")||0,this.submenuDirection=this.getAttribute("submenu-direction")||"right",this._activeRow=null,this._mouseLocs=[],this._lastDelayLoc=null,this._timeoutId=null,this._MOUSE_LOCS_TRACKED=3,this._DELAY=300,this.submenus.forEach(submenu=>{submenu.disableListeners()}),this.menu.addEventListener("mouseleave",this._mouseleaveMenu.bind(this)),this.rows.forEach(row=>{row.addEventListener("mouseenter",this._mouseenterRow.bind(this)),row.addEventListener("click",this._clickRow.bind(this))}),document.addEventListener("mousemove",this._mousemoveDocument.bind(this))}_mousemoveDocument(e){this._mouseLocs.push({x:e.pageX,y:e.pageY}),this._mouseLocs.length>this._MOUSE_LOCS_TRACKED&&this._mouseLocs.shift()}_mouseleaveMenu(){this._timeoutId&&clearTimeout(this._timeoutId),this._possiblyDeactivate(this._activeRow,this._DELAY)}_mouseenterRow(e){this._timeoutId&&clearTimeout(this._timeoutId),this._possiblyActivate(e.target)}_clickRow(e){this.activate(e.target)}openSubmenu(row){const submenu=row.querySelector("header-details-disclosure");submenu&&submenu.mouseEnterListener()}closeSubmenu(row){const submenu=row.querySelector("header-details-disclosure");submenu&&submenu.mouseLeaveListener()}activate(row){row!==this._activeRow&&(this._activeRow&&this.closeSubmenu(this._activeRow),this.openSubmenu(row),this._activeRow=row)}_possiblyActivate(row){const delay=this._activationDelay();delay?this._timeoutId=setTimeout(()=>{this._possiblyActivate(row)},delay):this.activate(row)}_possiblyDeactivate(row,initialDelay){const delay=initialDelay??this._activationDelay();delay?this._timeoutId=setTimeout(()=>{this._possiblyDeactivate(row)},delay):(this.closeSubmenu(row),this._activeRow=null)}_activationDelay(){if(!this._activeRow||!this.rows.includes(this._activeRow))return 0;const offset={top:this.menu.getBoundingClientRect().top+window.scrollY,left:this.menu.getBoundingClientRect().left+window.scrollX},upperLeft={x:offset.left,y:offset.top-this.tolerance},upperRight={x:offset.left+this.menu.offsetWidth,y:upperLeft.y},lowerLeft={x:offset.left,y:offset.top+this.menu.offsetHeight+this.tolerance},lowerRight={x:offset.left+this.menu.offsetWidth,y:lowerLeft.y},loc=this._mouseLocs[this._mouseLocs.length-1],prevLoc=this._mouseLocs[0];if(!loc||(prevLoc||(prevLoc=loc),prevLoc.x<offset.left||prevLoc.x>lowerRight.x||prevLoc.y<offset.top||prevLoc.y>lowerRight.y)||this._lastDelayLoc&&loc.x==this._lastDelayLoc.x&&loc.y==this._lastDelayLoc.y)return 0;function slope(a,b){return(b.y-a.y)/(b.x-a.x)}let decreasingCorner=upperRight,increasingCorner=lowerRight;this.submenuDirection=="left"?(decreasingCorner=lowerLeft,increasingCorner=upperLeft):this.submenuDirection=="below"&&(decreasingCorner=lowerRight,increasingCorner=lowerLeft);const decreasingSlope=slope(loc,decreasingCorner),increasingSlope=slope(loc,increasingCorner),prevDecreasingSlope=slope(prevLoc,decreasingCorner),prevIncreasingSlope=slope(prevLoc,increasingCorner);return decreasingSlope<prevDecreasingSlope&&increasingSlope>prevIncreasingSlope?(this._lastDelayLoc=loc,this._DELAY):(this._lastDelayLoc=null,0)}}customElements.define("nested-menu",NestedMenu);
2//# sourceMappingURL=/cdn/shop/t/37/assets/nested-menu.js.map?v=59797003545283775281732221485

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.