PageSourceSearch

https://distribucionmayorista.online/modules/creativeelements/view…/jquery.smartmenus.min.js?v=1.0.2

js distribucionmayorista.online collected 2026-10-04 13:26:11 UTC 24,994 bytes, 10 lines download raw bytes

1/*!
2 * SmartMenus jQuery Plugin - v1.0.2
3 * http://www.smartmenus.org/
4 *
5 * Copyright Vasil Dinkov, Vadikom Web Ltd.
6 * http://vadikom.com
7 *
8 * Licensed MIT
9 */
10!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)}(function($){var menuTrees=[],IE=!!window.createPopup,mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)};function initMouseDetection(t){var a,n,e=".smartmenus_mouse";mouseDetectionEnabled||t?mouseDetectionEnabled&&t&&($(document).unbind(e),mouseDetectionEnabled=!1):(a=!0,n=null,$(document).bind(getEventsNS([["mousemove",function(t){var e,s,i,o={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};n&&(e=Math.abs(n.x-o.x),s=Math.abs(n.y-o.y),(0<e||0<s)&&e<=2&&s<=2&&o.timeStamp-n.timeStamp<=300&&(mouse=!0,a&&((i=$(t.target).closest("a")).is("a")&&$.each(menuTrees,function(){if($.contains(this.$root[0],i[0]))return this.itemEnter({currentTarget:i[0]}),!1}),a=!1))),n=o}],[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut",function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)}]],e)),mouseDetectionEnabled=!0)}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,s){s=s||"";var i={};return $.each(t,function(t,e){i[e[0].split(" ").join(s+" ")+s]=e[1]}),i}return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var s,i,o,a=this;t||(menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0),t=".smartmenus",this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).bind(getEventsNS([["mouseover focusin",$.proxy(this.rootOver,this)],["mouseout focusout",$.proxy(this.rootOut,this)],["keydown",$.proxy(this.rootKeyDown,this)]],t)).delegate("a",getEventsNS([["mouseenter",$.proxy(this.itemEnter,this)],["mouseleave",$.proxy(this.itemLeave,this)],["mousedown",$.proxy(this.itemDown,this)],["focus",$.proxy(this.itemFocus,this)],["blur",$.proxy(this.itemBlur,this)],["click",$.proxy(this.itemClick,this)]],t)),t+=this.rootId,this.opts.hideOnClick&&$(document).bind(getEventsNS([["touchstart",$.proxy(this.docTouchStart,this)],["touchmove",$.proxy(this.docTouchMove,this)],["touchend",$.proxy(this.docTouchEnd,this)],["click",$.proxy(this.docClick,this)]],t)),$(window).bind(getEventsNS([["resize orientationchange",$.proxy(this.winResize,this)]],t)),this.opts.subIndicators&&(this.$subArrow=$("<span/>").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()),this.$firstSub=this.$root.find("ul").each(function(){a.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem&&(s=/(index|default)\.[^#\?\/]*/i,i=window.location.href.replace(s,""),o=i.replace(/#.*/,""),this.$root.find("a").each(function(){var t=this.href.replace(s,""),e=$(this);t!=i&&t!=o||(e.addClass("current"),a.opts.markCurrentTree&&e.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})),this.wasCollapsible=this.isCollapsible()},destroy:function(t){t||(e=".smartmenus",this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").unbind(e).undelegate(e),e+=this.rootId,$(document).unbind(e),$(window).unbind(e),this.opts.subIndicators&&(this.$subArrow=null)),this.menuHideAll();var e,s=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((s.opts.subMenusMinWidth||s.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(s.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("ie-shim").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(s.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){this.disabled||(this.menuHideAll(),t||this.opts.isPopup||!this.$root.is(":visible")||(t=this.$root.offset(),this.$disableOverlay=$('<div class="sm-jquery-disable-overlay"/>
10').css({position:"absolute",top:t.top,left:t.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)),this.disabled=!0)},docClick:function(t){this.$touchScrollingSub?this.$touchScrollingSub=null:(this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).is("a"))&&this.menuHideAll()},docTouchEnd:function(t){var e;this.lastTouch&&(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target)||(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),(e=this).hideTimeout=setTimeout(function(){e.menuHideAll()},350)),this.lastTouch=null)},docTouchMove:function(t){this.lastTouch&&(t=t.originalEvent.touches[0],this.lastTouch.x2=t.pageX,this.lastTouch.y2=t.pageY)},docTouchStart:function(t){t=t.originalEvent.touches[0];this.lastTouch={x1:t.pageX,y1:t.pageY,target:t.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){"none"==t.css("display")&&(s={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s,i=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),i=i&&(e?i.height||i.bottom-i.top:i.width||i.right-i.left);return i||0===i||(i=e?t[0].offsetHeight:t[0].offsetWidth),s&&t.hide().css(s),i},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var t=t?"Height":"Width",e=document.documentElement["client"+t],t=window["inner"+t];return e=t?Math.min(e,t):e},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"block"==this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){if("fixed"==$(this).css("position"))return!(t=!0)}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var s,i=t.closest("ul"),o=i.dataSM("level");1<o&&(!this.activatedItems[o-2]||this.activatedItems[o-2][0]!=i.dataSM("parent-a")[0])&&(s=this,$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){s.itemActivate($(this).dataSM("parent-a"))})),this.isCollapsible()&&!e||this.menuHideSubMenus(this.activatedItems[o-1]&&this.activatedItems[o-1][0]==t[0]?o:o-1),this.activatedItems[o-1]=t,!1!==this.$root.triggerHandler("activate.smapi",t[0])&&(i=t.dataSM("sub"))&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(i)},itemBlur:function(t){t=$(t.currentTarget);this.handleItemEvents(t)&&this.$root.triggerHandler("blur.smapi",t[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(!1===this.$root.triggerHandler("click.smapi",e[0]))return!1;var t=$(t.target).is("span.sub-arrow"),s=e.dataSM("sub"),i=!!s&&2==s.dataSM("level");if(s&&!s.is(":visible")){if(this.opts.showOnClick&&i&&(this.clickActivated=!0),this.itemActivate(e),s.is(":visible"))return!(this.focusActivated=!0)}else if(this.isCollapsible()&&t)return this.itemActivate(e),this.menuHide(s),!1;return!(this.opts.showOnClick&&i||e.hasClass("disabled")||!1===this.$root.triggerHandler("select.smapi",e[0]))&&void 0}},itemDown:function(t){t=$(t.currentTarget);this.handleItemEvents(t)&&t.dataSM("mousedown",!0)},itemEnter:function(t){var e,s=$(t.currentTarget);this.handleItemEvents(s)&&(this.isTouchMode()||(this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0),(e=this).showTimeout=setTimeout(function(){e.itemActivate(s)},this.opts.showOnClick&&1==s.closest("ul").dataSM("level")?1:this.opts.showTimeout)),this.$root.triggerHandler("mouseenter.smapi",s[0]))},itemFocus:function(t){t=$(t.currentTarget);this.handleItemEvents(t)&&(!this.focusActivated||this.isTouchMode()&&t.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==t[0]||this.itemActivate(t,!0),this.$root.triggerHandler("focus.smapi",t[0]))},itemLeave:function(t){t=$(t.currentTarget);this.handleItemEvents(t)&&(this.isTouchMode()||(t[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),t.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.
10smapi",t[0]))},menuHide:function(t){var e;!1!==this.$root.triggerHandler("beforehide.smapi",t[0])&&(t.stop(!0,!0),"none"!=t.css("display")&&(e=function(){t.css("z-index","")},this.isCollapsible()?this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("ie-shim")&&t.dataSM("ie-shim").remove().css({"-webkit-transform":"",transform:""}),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).unbind(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"}),e=t.dataSM("level"),this.activatedItems.splice(e-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])))},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;t<=e;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(this.$root.stop(!0,!0),this.$root.is(":visible")&&(this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration),this.$root.dataSM("ie-shim")&&this.$root.dataSM("ie-shim").remove())),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;t<=e;e--){var s=this.activatedItems[e].dataSM("sub");s&&this.menuHide(s)}},menuIframeShim:function(t){IE&&this.opts.overlapControlsInIE&&!t.dataSM("ie-shim")&&t.dataSM("ie-shim",$("<iframe/>").attr({src:"javascript:0",tabindex:-9}).css({position:"absolute",top:"auto",left:"0",opacity:0,border:"0"}))},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,s=t[0];(s=s.parentNode.parentNode)!=this.$root[0];)e++;var i=t.prevAll("a").eq(-1),o=((i=i.length?i:t.prevAll().find("a").eq(-1)).addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",i).dataSM("level",e).parent().dataSM("sub",t),i.attr("id")||this.accessIdPrefix+ ++this.idInc),a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;i.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&i[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(e){var t,s,i,o=e.dataSM("parent-a"),a=o.closest("li"),n=a.parent(),r=e.dataSM("level"),h=this.getWidth(e),u=this.getHeight(e),l=o.offset(),c=l.left,l=l.top,d=this.getWidth(o),o=this.getHeight(o),m=$(window),p=m.scrollLeft(),m=m.scrollTop(),f=this.getViewportWidth(),v=this.getViewportHeight(),n=n.parent().is("[data-sm-horizontal-sub]")||2==r&&!n.hasClass("sm-vertical"),a=this.opts.rightToLeftSubMenus&&!a.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&a.is("[data-sm-reverse]"),b=2==r?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,r=2==r?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY,S=n?(t=a?d-h-b:b,this.opts.bottomToTopSubMenus?-u-r:o+r):(t=a?b-h:d-b,this.opts.bottomToTopSubMenus?o-r-u:r);this.opts.keepInViewport&&(c=c+t,s=l+S,a&&c<p?t=n?p-c+t:d-b:!a&&p+f<c+h&&(t=n?p+f-h-c+t:b-h),n?!this.opts.bottomToTopSubMenus&&m+v<s+u&&u<=l-m-r&&(s=l+(S=-u-r)):u<v&&m+v<s+u?S+=m+v-u-s:(v<=u||s<m)&&(S+=m-s),(n&&(m+v+.49<s+u||s<m)||!n&&v+.49<u)&&(i=this,e.dataSM("scroll-arrows")||e.dataSM("scroll-arrows",$([$('<span class="scroll-up"><span class="scroll-up-arrow"></span></span>')[0],$('<span class="scroll-down"><span class="scroll-down-arrow"></span></span>')[0]]).bind({mouseenter:function(){e.dataSM("scroll").up=$(this).hasClass("scroll-up"),i.menuScroll(e)},mouseleave:function(t){i.menuScrollStop(e),i.menuScrollOut(e,t)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(e)),d=".smartmenus_scroll",e.dataSM("scroll",{y:this.cssTransforms3d?0:S-o,step:1,itemH:o,subH:u,arrowDownH:this.getHeight(e.dataSM("scroll-arrows").eq(1))}).bind(getEventsNS([["mouseover",function(t){i.menuScrollOver(e,t)}],["mouseout",function(t){i.menuScrollOut(e,t)}],["mousewheel DOMMouseScroll",function(t){i.menuScrollMousewheel(e,t)}]],d)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:t+(parseInt(e.css("border-left-width"))||0),width:h-(parseInt(e.css("border-left-width"))||0)-(parseInt(e.css("border-right-width"))||0),zIndex:e.css("z-index")}).eq(n&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()&&e.css({"touch-action":"none","-ms-touch-action":"none"}).bind(getEventsNS([[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp",function(t){i.menuScrollTouch(e,t)}]],d)))),e.css({top:"auto",left:"0",marginLeft:t,marginTop:S-o}),this.menuIframeShim(e),e.dataSM("ie-shim")&&e.dataSM("ie-shim").css({zIndex:e.css("z-index"),width:h,height:u,marginLeft:t,marginTop:S-o})},menuScroll:function(t,e,s){var i,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,(i=o.momentum)<.5)return void this.menuScrollStop(t)}else i=s||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r,s=t.dataSM("level");this.activatedItems[s-1]&&this.activatedItems[s-1].dataSM("sub")&&this.activatedItems[s-1].dataSM("sub").is(":visible")&&this.menuHide
10SubMenus(s-1),o.y=o.up&&n<=o.y||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>i?o.y+(o.up?i:-i):n,t.add(t.dataSM("ie-shim")).css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y<o.upEnd)&&a.eq(o.up?1:0).show(),o.y==n?(mouse&&a.eq(o.up?0:1).hide(),this.menuScrollStop(t)):e||(this.opts.scrollAccelerate&&o.step<this.opts.scrollStep&&(o.step+=.2),(r=this).scrollTimeout=requestAnimationFrame(function(){r.menuScroll(t)}))},menuScrollMousewheel:function(t,e){var s;this.getClosestMenu(e.target)==t[0]&&(s=0<((e=e.originalEvent).wheelDelta||-e.detail),t.dataSM("scroll-arrows").eq(s?0:1).is(":visible")&&(t.dataSM("scroll").up=s,this.menuScroll(t,!0))),e.preventDefault()},menuScrollOut:function(t,e){!mouse||/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden")},menuScrollOver:function(t,e){var s;mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]&&(this.menuScrollRefreshData(t),e=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH,t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-e.arrowDownH).end().css("visibility","visible"))},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(s=-(parseFloat(t.css("margin-top"))-s)),$.extend(e,{upEnd:s,downEnd:s+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){if(this.scrollTimeout)return cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0},menuScrollTouch:function(t,e){var s,i,o,a;isTouchEvent(e=e.originalEvent)&&(s=this.getTouchPoint(e),this.getClosestMenu(s.target)==t[0]&&(i=t.dataSM("scroll"),/(start|down)$/i.test(e.type)?(this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(i,{touchStartY:s.pageY,touchStartTime:e.timeStamp})):/move$/i.test(e.type)?(void 0!==(o=void 0!==i.touchY?i.touchY:i.touchStartY)&&o!=s.pageY&&(this.$touchScrollingSub=t,a=o<s.pageY,void 0!==i.up&&i.up!=a&&$.extend(i,{touchStartY:s.pageY,touchStartTime:e.timeStamp}),$.extend(i,{up:a,touchY:s.pageY}),this.menuScroll(t,!0,Math.abs(s.pageY-o))),e.preventDefault()):void 0!==i.touchY&&((i.momentum=15*Math.pow(Math.abs(s.pageY-i.touchStartY)/(e.timeStamp-i.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete i.touchY)))},menuShow:function(t){var e,s;!t.dataSM("beforefirstshowfired")&&(t.dataSM("beforefirstshowfired",!0),!1===this.$root.triggerHandler("beforefirstshow.smapi",t[0]))||!1===this.$root.triggerHandler("beforeshow.smapi",t[0])||(t.dataSM("shown-before",!0).stop(!0,!0),t.is(":visible")||(e=t.dataSM("parent-a"),(this.opts.keepHighlighted||this.isCollapsible())&&e.addClass("highlighted"),this.isCollapsible()?t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""}):(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth&&(s=this.getWidth(t),t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth))),this.menuPosition(t),t.dataSM("ie-shim")&&t.dataSM("ie-shim").insertBefore(t)),s=function(){t.css("overflow","")},this.isCollapsible()?this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,s):t.show(this.opts.collapsibleShowDuration,s):this.opts.showFunction?this.opts.showFunction.call(this,t,s):t.show(this.opts.showDuration,s),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])))},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){var s;this.opts.isPopup?(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0).stop(!0,!0),this.$root.is(":visible")||(this.$root.css({left:t,top:e}),this.menuIframeShim(this.$root),this.$root.dataSM("ie-shim")&&this.$root.dataSM("ie-shim").css({zIndex:this.$root.css("z-index"),width:this.getWidth(this.$root),height:this.getHeight(this.$root),left:t,top:e}).insertBefore(this.$root),t=function(){s.$root.css("overflow","")},(s=this).opts.showFunction?this.opts.showFunction.call(this,this.$root,t):this.$root.show(this.opts.showDuration,t),this.visibleSubMenus[0]=this.$root)):alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.')},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];e&&(this.menuHideAll(),e[0].focus(),(s=e.dataSM("sub"))&&this.menuHide(s));break;case 32:var s,e=$(t.target);e.is("a")&&this.handleItemEvents(e)&&(s=e.dataSM("sub"))&&!s.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}},rootOut:function(t){var e;this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.opts.showOnClick&&this.opts.hideOnClick||((e=this).hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)))},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){this.handleEvents()?"onorientationchange"in window&&"orientationchange"!=t.type||(t=this.isCollapsible(),this.wasCollapsible&&t||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=t):this.$disableOverlay&&(t=this.$root.offset(),this.$disableOverlay.css({top:t.top,left
10:t.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()}))}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){var args,method;if("string"==typeof options)return args=arguments,method=options,Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)});var dataOpts=this.data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}return this.each(function(){new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"prepend",subIndicatorsText:"+",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,overlapControlsInIE:!0},$});

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.