NOBUG: Fixed file access permissions
[moodle.git] / lib / yuilib / 3.13.0 / node-scroll-info / node-scroll-info-coverage.js
blob88ec53fe8f50d5b4a8847f7b2a176c63f452b973
1 /*
2 YUI 3.13.0 (build 508226d)
3 Copyright 2013 Yahoo! Inc. All rights reserved.
4 Licensed under the BSD License.
5 http://yuilibrary.com/license/
6 */
8 if (typeof __coverage__ === 'undefined') { __coverage__ = {}; }
9 if (!__coverage__['build/node-scroll-info/node-scroll-info.js']) {
10    __coverage__['build/node-scroll-info/node-scroll-info.js'] = {"path":"build/node-scroll-info/node-scroll-info.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0,0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0,0],"28":[0,0],"29":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":28},"end":{"line":1,"column":47}}},"2":{"name":"(anonymous_2)","line":209,"loc":{"start":{"line":209,"column":17},"end":{"line":209,"column":35}}},"3":{"name":"(anonymous_3)","line":224,"loc":{"start":{"line":224,"column":16},"end":{"line":224,"column":28}}},"4":{"name":"(anonymous_4)","line":246,"loc":{"start":{"line":246,"column":23},"end":{"line":246,"column":51}}},"5":{"name":"(anonymous_5)","line":253,"loc":{"start":{"line":253,"column":55},"end":{"line":253,"column":69}}},"6":{"name":"(anonymous_6)","line":273,"loc":{"start":{"line":273,"column":22},"end":{"line":273,"column":50}}},"7":{"name":"(anonymous_7)","line":280,"loc":{"start":{"line":280,"column":55},"end":{"line":280,"column":69}}},"8":{"name":"(anonymous_8)","line":296,"loc":{"start":{"line":296,"column":19},"end":{"line":296,"column":31}}},"9":{"name":"(anonymous_9)","line":342,"loc":{"start":{"line":342,"column":20},"end":{"line":342,"column":44}}},"10":{"name":"(anonymous_10)","line":360,"loc":{"start":{"line":360,"column":23},"end":{"line":360,"column":35}}},"11":{"name":"(anonymous_11)","line":393,"loc":{"start":{"line":393,"column":11},"end":{"line":393,"column":23}}},"12":{"name":"(anonymous_12)","line":430,"loc":{"start":{"line":430,"column":20},"end":{"line":430,"column":32}}},"13":{"name":"(anonymous_13)","line":450,"loc":{"start":{"line":450,"column":24},"end":{"line":450,"column":46}}},"14":{"name":"(anonymous_14)","line":477,"loc":{"start":{"line":477,"column":30},"end":{"line":477,"column":42}}},"15":{"name":"(anonymous_15)","line":509,"loc":{"start":{"line":509,"column":20},"end":{"line":509,"column":33}}},"16":{"name":"(anonymous_16)","line":560,"loc":{"start":{"line":560,"column":22},"end":{"line":560,"column":35}}},"17":{"name":"(anonymous_17)","line":565,"loc":{"start":{"line":565,"column":41},"end":{"line":565,"column":53}}},"18":{"name":"(anonymous_18)","line":576,"loc":{"start":{"line":576,"column":18},"end":{"line":576,"column":30}}},"19":{"name":"(anonymous_19)","line":588,"loc":{"start":{"line":588,"column":29},"end":{"line":588,"column":42}}},"20":{"name":"(anonymous_20)","line":600,"loc":{"start":{"line":600,"column":30},"end":{"line":600,"column":43}}},"21":{"name":"(anonymous_21)","line":611,"loc":{"start":{"line":611,"column":24},"end":{"line":611,"column":36}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":655,"column":116}},"2":{"start":{"line":33,"column":0},"end":{"line":34,"column":23}},"3":{"start":{"line":74,"column":0},"end":{"line":166,"column":38}},"4":{"start":{"line":168,"column":0},"end":{"line":652,"column":3}},"5":{"start":{"line":211,"column":8},"end":{"line":211,"column":50}},"6":{"start":{"line":212,"column":8},"end":{"line":212,"column":90}},"7":{"start":{"line":213,"column":8},"end":{"line":213,"column":62}},"8":{"start":{"line":214,"column":8},"end":{"line":214,"column":63}},"9":{"start":{"line":215,"column":8},"end":{"line":215,"column":60}},"10":{"start":{"line":217,"column":8},"end":{"line":217,"column":33}},"11":{"start":{"line":219,"column":8},"end":{"line":219,"column":48}},"12":{"start":{"line":221,"column":8},"end":{"line":221,"column":21}},"13":{"start":{"line":225,"column":8},"end":{"line":225,"column":49}},"14":{"start":{"line":226,"column":8},"end":{"line":226,"column":28}},"15":{"start":{"line":247,"column":8},"end":{"line":249,"column":9}},"16":{"start":{"line":248,"column":12},"end":{"line":248,"column":40}},"17":{"start":{"line":251,"column":8},"end":{"line":251,"column":75}},"18":{"start":{"line":253,"column":8},"end":{"line":255,"column":18}},"19":{"start":{"line":254,"column":12},"end":{"line":254,"column":56}},"20":{"start":{"line":274,"column":8},"end":{"line":276,"column":9}},"21":{"start":{"line":275,"column":12},"end":{"line":275,"column":40}},"22":{"start":{"line":278,"column":8},"end":{"line":278,"column":75}},"23":{"start":{"line":280,"column":8},"end":{"line":282,"column":18}},"24":{"start":{"line":281,"column":12},"end":{"line":281,"column":55}},"25":{"start":{"line":297,"column":8},"end":{"line":307,"column":52}},"26":{"start":{"line":309,"column":8},"end":{"line":326,"column":10}},"27":{"start":{"line":343,"column":8},"end":{"line":343,"column":27}},"28":{"start":{"line":344,"column":8},"end":{"line":344,"column":71}},"29":{"start":{"line":361,"column":8},"end":{"line":361,"column":40}},"30":{"start":{"line":366,"column":8},"end":{"line":372,"column":9}},"31":{"start":{"line":367,"column":12},"end":{"line":367,"column":46}},"32":{"start":{"line":368,"column":12},"end":{"line":368,"column":45}},"33":{"start":{"line":370,"column":12},"end":{"line":370,"column":49}},"34":{"start":{"line":371,"column":12},"end":{"line":371,"column":48}},"35":{"start":{"line":374,"column":8},"end":{"line":380,"column":9}},"36":{"start":{"line":375,"column":12},"end":{"line":375,"column":43}},"37":{"start":{"line":376,"column":12},"end":{"line":376,"column":42}},"38":{"start":{"line":378,"column":12},"end":{"line":378,"column":57}},"39":{"start":{"line":379,"column":12},"end":{"line":379,"column":56}},"40":{"start":{"line":382,"column":8},"end":{"line":382,"column":40}},"41":{"start":{"line":394,"column":8},"end":{"line":394,"column":35}},"42":{"start":{"line":396,"column":8},"end":{"line":403,"column":10}},"43":{"start":{"line":407,"column":8},"end":{"line":417,"column":9}},"44":{"start":{"line":408,"column":12},"end":{"line":408,"column":84}},"45":{"start":{"line":413,"column":12},"end":{"line":416,"column":14}},"46":{"start":{"line":433,"column":8},"end":{"line":434,"column":46}},"47":{"start":{"line":451,"column":8},"end":{"line":452,"column":50}},"48":{"start":{"line":454,"column":8},"end":{"line":456,"column":9}},"49":{"start":{"line":455,"column":12},"end":{"line":455,"column":40}},"50":{"start":{"line":461,"column":8},"end":{"line":464,"column":60}},"51":{"start":{"line":478,"column":8},"end":{"line":481,"column":21}},"52":{"start":{"line":483,"column":8},"end":{"line":496,"column":9}},"53":{"start":{"line":484,"column":12},"end":{"line":491,"column":14}},"54":{"start":{"line":493,"column":12},"end":{"line":493,"column":40}},"55":{"start":{"line":495,"column":12},"end":{"line":495,"column":64}},"56":{"start":{"line":498,"column":8},"end":{"line":498,"column":34}},"57":{"start":{"line":510,"column":8},"end":{"line":512,"column":42}},"58":{"start":{"line":514,"column":8},"end":{"line":514,"column":32}},"59":{"start":{"line":516,"column":8},"end":{"line":516,"column":38}},"60":{"start":{"line":518,"column":8},"end":{"line":522,"column":9}},"61":{"start":{"line":519,"column":12},"end":{"line":519,"column":47}},"62":{"start":{"line":520,"column":15},"end":{"line":522,"column":9}},"63":{"start":{"line":521,"column":12},"end":{"line":521,"column":48}},"64":{"start":{"line":524,"column":8},"end":{"line":528,"column":9}},"65":{"start":{"line":525,"column":12},"end":{"line":525,"column":45}},"66":{"start":{"line":526,"column":15},"end":{"line":528,"column":9}},"67":{"start":{"line":527,"column":12},"end":{"line":527,"column":47}},"68":{"start":{"line":530,"column":8},"end":{"line":534,"column":9}},"69":{"start":{"line":533,"column":12},"end":{"line":533,"column":52}},"70":{"start":{"line":536,"column":8},"end":{"line":538,"column":9}},"71":{"start":{"line":537,"column":12},"end":{"line":537,"column":50}},"72":{"start":{"line":540,"column":8},"end":{"line":544,"column":9}},"73":{"start":{"line":543,"column":12},"end":{"line":543,"column":51}},"74":{"start":{"line":546,"column":8},"end":{"line":548,"column":9}},"75":{"start":{"line":547,"column":12},"end":{"line":547,"column":49}},"76":{"start":{"line":561,"column":8},"end":{"line":561,"column":24}},"77":{"start":{"line":563,"column":8},"end":{"line":563,"column":42}},"78":{"start":{"line":565,"column":8},"end":{"line":567,"column":30}},"79":{"start":{"line":566,"column":12},"end":{"line":566,"column":35}},"80":{"start":{"line":577,"column":8},"end":{"line":577,"column":33}},"81":{"start":{"line":589,"column":8},"end":{"line":589,"column":37}},"82":{"start":{"line":601,"column":8},"end":{"line":601,"column":38}},"83":{"start":{"line":612,"column":8},"end":{"line":612,"column":40}}},"branchMap":{"1":{"line":247,"type":"if","locations":[{"start":{"line":247,"column":8},"end":{"line":247,"column":8}},{"start":{"line":247,"column":8},"end":{"line":247,"column":8}}]},"2":{"line":251,"type":"binary-expr","locations":[{"start":{"line":251,"column":40},"end":{"line":251,"column":48}},{"start":{"line":251,"column":52},"end":{"line":251,"column":55}}]},"3":{"line":274,"type":"if","locations":[{"start":{"line":274,"column":8},"end":{"line":274,"column":8}},{"start":{"line":274,"column":8},"end":{"line":274,"column":8}}]},"4":{"line":278,"type":"binary-expr","locations":[{"start":{"line":278,"column":40},"end":{"line":278,"column":48}},{"start":{"line":278,"column":52},"end":{"line":278,"column":55}}]},"5":{"line":315,"type":"binary-expr","locations":[{"start":{"line":315,"column":27},"end":{"line":315,"column":37}},{"start":{"line":315,"column":41},"end":{"line":315,"column":73}}]},"6":{"line":316,"type":"binary-expr","locations":[{"start":{"line":316,"column":27},"end":{"line":316,"column":37}},{"start":{"line":316,"column":41},"end":{"line":316,"column":75}}]},"7":{"line":317,"type":"binary-expr","locations":[{"start":{"line":317,"column":27},"end":{"line":317,"column":37}},{"start":{"line":317,"column":41},"end":{"line":317,"column":75}}]},"8":{"line":318,"type":"binary-expr","locations":[{"start":{"line":318,"column":27},"end":{"line":318,"column":37}},{"start":{"line":318,"column":41},"end":{"line":318,"column":73}}]},"9":{"line":344,"type":"binary-expr","locations":[{"start":{"line":344,"column":18},"end":{"line":344,"column":22}},{"start":{"line":344,"column":26},"end":{"line":344,"column":69}}]},"10":{"line":366,"type":"if","locations":[{"start":{"line":366,"column":8},"end":{"line":366,"column":8}},{"start":{"line":366,"column":8},"end":{"line":366,"column":8}}]},"11":{"line":374,"type":"if","locations":[{"start":{"line":374,"column":8},"end":{"line":374,"column":8}},{"start":{"line":374,"column":8},"end":{"line":374,"column":8}}]},"12":{"line":407,"type":"if","locations":[{"start":{"line":407,"column":8},"end":{"line":407,"column":8}},{"start":{"line":407,"column":8},"end":{"line":407,"column":8}}]},"13":{"line":433,"type":"cond-expr","locations":[{"start":{"line":433,"column":50},"end":{"line":433,"column":69}},{"start":{"line":434,"column":16},"end":{"line":434,"column":45}}]},"14":{"line":433,"type":"binary-expr","locations":[{"start":{"line":433,"column":15},"end":{"line":433,"column":31}},{"start":{"line":433,"column":35},"end":{"line":433,"column":47}}]},"15":{"line":454,"type":"if","locations":[{"start":{"line":454,"column":8},"end":{"line":454,"column":8}},{"start":{"line":454,"column":8},"end":{"line":454,"column":8}}]},"16":{"line":461,"type":"binary-expr","locations":[{"start":{"line":461,"column":17},"end":{"line":461,"column":52}},{"start":{"line":462,"column":23},"end":{"line":462,"column":58}},{"start":{"line":463,"column":23},"end":{"line":463,"column":58}},{"start":{"line":464,"column":23},"end":{"line":464,"column":58}}]},"17":{"line":483,"type":"if","locations":[{"start":{"line":483,"column":8},"end":{"line":483,"column":8}},{"start":{"line":483,"column":8},"end":{"line":483,"column":8}}]},"18":{"line":518,"type":"if","locations":[{"start":{"line":518,"column":8},"end":{"line":518,"column":8}},{"start":{"line":518,"column":8},"end":{"line":518,"column":8}}]},"19":{"line":520,"type":"if","locations":[{"start":{"line":520,"column":15},"end":{"line":520,"column":15}},{"start":{"line":520,"column":15},"end":{"line":520,"column":15}}]},"20":{"line":524,"type":"if","locations":[{"start":{"line":524,"column":8},"end":{"line":524,"column":8}},{"start":{"line":524,"column":8},"end":{"line":524,"column":8}}]},"21":{"line":526,"type":"if","locations":[{"start":{"line":526,"column":15},"end":{"line":526,"column":15}},{"start":{"line":526,"column":15},"end":{"line":526,"column":15}}]},"22":{"line":530,"type":"if","locations":[{"start":{"line":530,"column":8},"end":{"line":530,"column":8}},{"start":{"line":530,"column":8},"end":{"line":530,"column":8}}]},"23":{"line":530,"type":"binary-expr","locations":[{"start":{"line":530,"column":12},"end":{"line":530,"column":25}},{"start":{"line":530,"column":30},"end":{"line":530,"column":50}},{"start":{"line":531,"column":16},"end":{"line":531,"column":59}}]},"24":{"line":536,"type":"if","locations":[{"start":{"line":536,"column":8},"end":{"line":536,"column":8}},{"start":{"line":536,"column":8},"end":{"line":536,"column":8}}]},"25":{"line":536,"type":"binary-expr","locations":[{"start":{"line":536,"column":12},"end":{"line":536,"column":23}},{"start":{"line":536,"column":27},"end":{"line":536,"column":45}}]},"26":{"line":540,"type":"if","locations":[{"start":{"line":540,"column":8},"end":{"line":540,"column":8}},{"start":{"line":540,"column":8},"end":{"line":540,"column":8}}]},"27":{"line":540,"type":"binary-expr","locations":[{"start":{"line":540,"column":12},"end":{"line":540,"column":24}},{"start":{"line":540,"column":29},"end":{"line":540,"column":48}},{"start":{"line":541,"column":16},"end":{"line":541,"column":57}}]},"28":{"line":546,"type":"if","locations":[{"start":{"line":546,"column":8},"end":{"line":546,"column":8}},{"start":{"line":546,"column":8},"end":{"line":546,"column":8}}]},"29":{"line":546,"type":"binary-expr","locations":[{"start":{"line":546,"column":12},"end":{"line":546,"column":22}},{"start":{"line":546,"column":26},"end":{"line":546,"column":43}}]}},"code":["(function () { YUI.add('node-scroll-info', function (Y, NAME) {","","/*jshint onevar:false */","","/**","Provides the ScrollInfo Node plugin, which exposes convenient events and methods","related to scrolling.","","@module node-scroll-info","@since 3.7.0","**/","","/**","Provides convenient events and methods related to scrolling. This could be used,","for example, to implement infinite scrolling, or to lazy-load content based on","the current scroll position.","","### Example","","    var body = Y.one('body');","","    body.plug(Y.Plugin.ScrollInfo);","","    body.scrollInfo.on('scrollToBottom', function (e) {","        // Load more content when the user scrolls to the bottom of the page.","    });","","@class Plugin.ScrollInfo","@extends Plugin.Base","@since 3.7.0","**/","","var doc = Y.config.doc,","    win = Y.config.win;","","/**","Fired when the user scrolls within the host node.","","This event (like all scroll events exposed by ScrollInfo) is throttled and fired","only after the number of milliseconds specified by the `scrollDelay` attribute","have passed in order to prevent thrashing.","","This event passes along the event facade for the standard DOM `scroll` event and","mixes in the following additional properties.","","@event scroll","@param {Boolean} atBottom Whether the current scroll position is at the bottom","    of the scrollable region.","@param {Boolean} atLeft Whether the current scroll position is at the extreme","    left of the scrollable region.","@param {Boolean} atRight Whether the current scroll position is at the extreme","    right of the scrollable region.","@param {Boolean} atTop Whether the current scroll position is at the top of the","    scrollable region.","@param {Boolean} isScrollDown `true` if the user scrolled down.","@param {Boolean} isScrollLeft `true` if the user scrolled left.","@param {Boolean} isScrollRight `true` if the user scrolled right.","@param {Boolean} isScrollUp `true` if the user scrolled up.","@param {Number} scrollBottom Y value of the bottom-most onscreen pixel of the","    scrollable region.","@param {Number} scrollHeight Total height in pixels of the scrollable region,","    including offscreen pixels.","@param {Number} scrollLeft X value of the left-most onscreen pixel of the","    scrollable region.","@param {Number} scrollRight X value of the right-most onscreen pixel of the","    scrollable region.","@param {Number} scrollTop Y value of the top-most onscreen pixel of the","    scrollable region.","@param {Number} scrollWidth Total width in pixels of the scrollable region,","    including offscreen pixels.","@see scrollDelay","@see scrollMargin","**/","var EVT_SCROLL = 'scroll',","","    /**","    Fired when the user scrolls down within the host node.","","    This event provides the same event facade as the `scroll` event. See that","    event for details.","","    @event scrollDown","    @see scroll","    **/","    EVT_SCROLL_DOWN = 'scrollDown',","","    /**","    Fired when the user scrolls left within the host node.","","    This event provides the same event facade as the `scroll` event. See that","    event for details.","","    @event scrollLeft","    @see scroll","    **/","    EVT_SCROLL_LEFT = 'scrollLeft',","","    /**","    Fired when the user scrolls right within the host node.","","    This event provides the same event facade as the `scroll` event. See that","    event for details.","","    @event scrollRight","    @see scroll","    **/","    EVT_SCROLL_RIGHT = 'scrollRight',","","    /**","    Fired when the user scrolls up within the host node.","","    This event provides the same event facade as the `scroll` event. See that","    event for details.","","    @event scrollUp","    @see scroll","    **/","    EVT_SCROLL_UP = 'scrollUp',","","    /**","    Fired when the user scrolls to the bottom of the scrollable region within","    the host node.","","    This event provides the same event facade as the `scroll` event. See that","    event for details.","","    @event scrollToBottom","    @see scroll","    **/","    EVT_SCROLL_TO_BOTTOM = 'scrollToBottom',","","    /**","    Fired when the user scrolls to the extreme left of the scrollable region","    within the host node.","","    This event provides the same event facade as the `scroll` event. See that","    event for details.","","    @event scrollToLeft","    @see scroll","    **/","    EVT_SCROLL_TO_LEFT = 'scrollToLeft',","","    /**","    Fired when the user scrolls to the extreme right of the scrollable region","    within the host node.","","    This event provides the same event facade as the `scroll` event. See that","    event for details.","","    @event scrollToRight","    @see scroll","    **/","    EVT_SCROLL_TO_RIGHT = 'scrollToRight',","","    /**","    Fired when the user scrolls to the top of the scrollable region within the","    host node.","","    This event provides the same event facade as the `scroll` event. See that","    event for details.","","    @event scrollToTop","    @see scroll","    **/","    EVT_SCROLL_TO_TOP = 'scrollToTop';","","Y.Plugin.ScrollInfo = Y.Base.create('scrollInfoPlugin', Y.Plugin.Base, [], {","    // -- Protected Properties -------------------------------------------------","","    /**","    Height of the visible region of the host node in pixels. If the host node is","    the body, this will be the same as `_winHeight`.","","    @property {Number} _height","    @protected","    **/","","    /**","    Whether or not the host node is the `<body>` element.","","    @property {Boolean} _hostIsBody","    @protected","    **/","","    /**","    Width of the visible region of the host node in pixels. If the host node is","    the body, this will be the same as `_winWidth`.","","    @property {Number} _width","    @protected","    **/","","    /**","    Height of the viewport in pixels.","","    @property {Number} _winHeight","    @protected","    **/","","    /**","    Width of the viewport in pixels.","","    @property {Number} _winWidth","    @protected","    **/","","    // -- Lifecycle Methods ----------------------------------------------------","    initializer: function (config) {","        // Cache for quicker lookups in the critical path.","        this._host                  = config.host;","        this._hostIsBody            = this._host.get('nodeName').toLowerCase() === 'body';","        this._scrollDelay           = this.get('scrollDelay');","        this._scrollMargin          = this.get('scrollMargin');","        this._scrollNode            = this._getScrollNode();","","        this.refreshDimensions();","","        this._lastScroll = this.getScrollInfo();","","        this._bind();","    },","","    destructor: function () {","        new Y.EventHandle(this._events).detach();","        this._events = null;","    },","","    // -- Public Methods -------------------------------------------------------","","    /**","    Returns a NodeList containing all offscreen nodes inside the host node that","    match the given CSS selector. An offscreen node is any node that is entirely","    outside the visible (onscreen) region of the host node based on the current","    scroll location.","","    @method getOffscreenNodes","    @param {String} [selector] CSS selector. If omitted, all offscreen nodes","        will be returned.","    @param {Number} [margin] Additional margin in pixels beyond the actual","        onscreen region that should be considered \"onscreen\" for the purposes of","        this query. Defaults to the value of the `scrollMargin` attribute.","    @return {NodeList} Offscreen nodes matching _selector_.","    @see scrollMargin","    **/","    getOffscreenNodes: function (selector, margin) {","        if (typeof margin === 'undefined') {","            margin = this._scrollMargin;","        }","","        var elements = Y.Selector.query(selector || '*', this._host._node);","","        return new Y.NodeList(Y.Array.filter(elements, function (el) {","            return !this._isElementOnscreen(el, margin);","        }, this));","    },","","    /**","    Returns a NodeList containing all onscreen nodes inside the host node that","    match the given CSS selector. An onscreen node is any node that is fully or","    partially within the visible (onscreen) region of the host node based on the","    current scroll location.","","    @method getOnscreenNodes","    @param {String} [selector] CSS selector. If omitted, all onscreen nodes will","        be returned.","    @param {Number} [margin] Additional margin in pixels beyond the actual","        onscreen region that should be considered \"onscreen\" for the purposes of","        this query. Defaults to the value of the `scrollMargin` attribute.","    @return {NodeList} Onscreen nodes matching _selector_.","    @see scrollMargin","    **/","    getOnscreenNodes: function (selector, margin) {","        if (typeof margin === 'undefined') {","            margin = this._scrollMargin;","        }","","        var elements = Y.Selector.query(selector || '*', this._host._node);","","        return new Y.NodeList(Y.Array.filter(elements, function (el) {","            return this._isElementOnscreen(el, margin);","        }, this));","    },","","    /**","    Returns an object hash containing information about the current scroll","    position of the host node. This is the same information that's mixed into","    the event facade of the `scroll` event and other scroll-related events.","","    @method getScrollInfo","    @return {Object} Object hash containing information about the current scroll","        position. See the `scroll` event for details on what properties this","        object contains.","    @see scroll","    **/","    getScrollInfo: function () {","        var domNode    = this._scrollNode,","            lastScroll = this._lastScroll,","            margin     = this._scrollMargin,","","            scrollLeft   = domNode.scrollLeft,","            scrollHeight = domNode.scrollHeight,","            scrollTop    = domNode.scrollTop,","            scrollWidth  = domNode.scrollWidth,","","            scrollBottom = scrollTop + this._height,","            scrollRight  = scrollLeft + this._width;","","        return {","            atBottom: scrollBottom > (scrollHeight - margin),","            atLeft  : scrollLeft < margin,","            atRight : scrollRight > (scrollWidth - margin),","            atTop   : scrollTop < margin,","","            isScrollDown : lastScroll && scrollTop > lastScroll.scrollTop,","            isScrollLeft : lastScroll && scrollLeft < lastScroll.scrollLeft,","            isScrollRight: lastScroll && scrollLeft > lastScroll.scrollLeft,","            isScrollUp   : lastScroll && scrollTop < lastScroll.scrollTop,","","            scrollBottom: scrollBottom,","            scrollHeight: scrollHeight,","            scrollLeft  : scrollLeft,","            scrollRight : scrollRight,","            scrollTop   : scrollTop,","            scrollWidth : scrollWidth","        };","    },","","    /**","    Returns `true` if _node_ is at least partially onscreen within the host","    node, `false` otherwise.","","    @method isNodeOnscreen","    @param {HTMLElement|Node|String} node Node or selector to check.","    @param {Number} [margin] Additional margin in pixels beyond the actual","        onscreen region that should be considered \"onscreen\" for the purposes of","        this query. Defaults to the value of the `scrollMargin` attribute.","    @return {Boolean} `true` if _node_ is at least partially onscreen within the","        host node, `false` otherwise.","    @since 3.11.0","    **/","    isNodeOnscreen: function (node, margin) {","        node = Y.one(node);","        return !!(node && this._isElementOnscreen(node._node, margin));","    },","","    /**","    Refreshes cached position, height, and width dimensions for the host node.","    If the host node is the body, then the viewport height and width will be","    used.","","    This info is cached to improve performance during scroll events, since it's","    expensive to touch the DOM for these values. Dimensions are automatically","    refreshed whenever the browser is resized, but if you change the dimensions","    or position of the host node in JS, you may need to call","    `refreshDimensions()` manually to cache the new dimensions.","","    @method refreshDimensions","    **/","    refreshDimensions: function () {","        var docEl = doc.documentElement;","","        // On iOS devices, documentElement.clientHeight/Width aren't reliable,","        // but window.innerHeight/Width are. The dom-screen module's viewport","        // size methods don't account for this, which is why we do it here.","        if (Y.UA.ios) {","            this._winHeight = win.innerHeight;","            this._winWidth  = win.innerWidth;","        } else {","            this._winHeight = docEl.clientHeight;","            this._winWidth  = docEl.clientWidth;","        }","","        if (this._hostIsBody) {","            this._height = this._winHeight;","            this._width  = this._winWidth;","        } else {","            this._height = this._scrollNode.clientHeight;","            this._width  = this._scrollNode.clientWidth;","        }","","        this._refreshHostBoundingRect();","    },","","    // -- Protected Methods ----------------------------------------------------","","    /**","    Binds event handlers.","","    @method _bind","    @protected","    **/","    _bind: function () {","        var winNode = Y.one('win');","","        this._events = [","            this.after({","                scrollDelayChange : this._afterScrollDelayChange,","                scrollMarginChange: this._afterScrollMarginChange","            }),","","            winNode.on('windowresize', this._afterResize, this)","        ];","","        // If the host node is the body, listen for the scroll event on the","        // window, since <body> doesn't have a scroll event.","        if (this._hostIsBody) {","            this._events.push(winNode.after('scroll', this._afterHostScroll, this));","        } else {","            // The host node is not the body, but we still need to listen for","            // window scroll events so we can determine whether nodes are","            // onscreen.","            this._events.push(","                winNode.after('scroll', this._afterWindowScroll, this),","                this._host.after('scroll', this._afterHostScroll, this)","            );","        }","    },","","    /**","    Returns the DOM node that should be used to lookup scroll coordinates. In","    some browsers, the `<body>` element doesn't return scroll coordinates, and","    the documentElement must be used instead; this method takes care of","    determining which node should be used.","","    @method _getScrollNode","    @return {HTMLElement} DOM node.","    @protected","    **/","    _getScrollNode: function () {","        // WebKit returns scroll coordinates on the body element, but other","        // browsers don't, so we have to use the documentElement.","        return this._hostIsBody && !Y.UA.webkit ? doc.documentElement :","                Y.Node.getDOMNode(this._host);","    },","","    /**","    Underlying element-based implementation for `isNodeOnscreen()`.","","    @method _isElementOnscreen","    @param {HTMLElement} el HTML element.","    @param {Number} [margin] Additional margin in pixels beyond the actual","        onscreen region that should be considered \"onscreen\" for the purposes of","        this query. Defaults to the value of the `scrollMargin` attribute.","    @return {Boolean} `true` if _el_ is at least partially onscreen within the","        host node, `false` otherwise.","    @protected","    @since 3.11.0","    **/","    _isElementOnscreen: function (el, margin) {","        var hostRect = this._hostRect,","            rect     = el.getBoundingClientRect();","","        if (typeof margin === 'undefined') {","            margin = this._scrollMargin;","        }","","        // Determine whether any part of _el_ is within the visible region of","        // the host element or the specified margin around the visible region of","        // the host element.","        return !(rect.top > hostRect.bottom + margin","                    || rect.bottom < hostRect.top - margin","                    || rect.right < hostRect.left - margin","                    || rect.left > hostRect.right + margin);","    },","","    /**","    Caches the bounding rect of the host node.","","    If the host node is the body, the bounding rect will be faked to represent","    the dimensions of the viewport, since the actual body dimensions may extend","    beyond the viewport and we only care about the visible region.","","    @method _refreshHostBoundingRect","    @protected","    **/","    _refreshHostBoundingRect: function () {","        var winHeight = this._winHeight,","            winWidth  = this._winWidth,","","            hostRect;","","        if (this._hostIsBody) {","            hostRect = {","                bottom: winHeight,","                height: winHeight,","                left  : 0,","                right : winWidth,","                top   : 0,","                width : winWidth","            };","","            this._isHostOnscreen = true;","        } else {","            hostRect = this._scrollNode.getBoundingClientRect();","        }","","        this._hostRect = hostRect;","    },","","    /**","    Mixes detailed scroll information into the given DOM `scroll` event facade","    and fires appropriate local events.","","    @method _triggerScroll","    @param {EventFacade} e Event facade from the DOM `scroll` event.","    @protected","    **/","    _triggerScroll: function (e) {","        var info       = this.getScrollInfo(),","            facade     = Y.merge(e, info),","            lastScroll = this._lastScroll;","","        this._lastScroll = info;","","        this.fire(EVT_SCROLL, facade);","","        if (info.isScrollLeft) {","            this.fire(EVT_SCROLL_LEFT, facade);","        } else if (info.isScrollRight) {","            this.fire(EVT_SCROLL_RIGHT, facade);","        }","","        if (info.isScrollUp) {","            this.fire(EVT_SCROLL_UP, facade);","        } else if (info.isScrollDown) {","            this.fire(EVT_SCROLL_DOWN, facade);","        }","","        if (info.atBottom && (!lastScroll.atBottom ||","                info.scrollHeight > lastScroll.scrollHeight)) {","","            this.fire(EVT_SCROLL_TO_BOTTOM, facade);","        }","","        if (info.atLeft && !lastScroll.atLeft) {","            this.fire(EVT_SCROLL_TO_LEFT, facade);","        }","","        if (info.atRight && (!lastScroll.atRight ||","                info.scrollWidth > lastScroll.scrollWidth)) {","","            this.fire(EVT_SCROLL_TO_RIGHT, facade);","        }","","        if (info.atTop && !lastScroll.atTop) {","            this.fire(EVT_SCROLL_TO_TOP, facade);","        }","    },","","    // -- Protected Event Handlers ---------------------------------------------","","    /**","    Handles DOM `scroll` events on the host node.","","    @method _afterHostScroll","    @param {EventFacade} e","    @protected","    **/","    _afterHostScroll: function (e) {","        var self = this;","","        clearTimeout(this._scrollTimeout);","","        this._scrollTimeout = setTimeout(function () {","            self._triggerScroll(e);","        }, this._scrollDelay);","    },","","    /**","    Handles browser resize events.","","    @method _afterResize","    @protected","    **/","    _afterResize: function () {","        this.refreshDimensions();","    },","","    /**","    Caches the `scrollDelay` value after that attribute changes to allow","    quicker lookups in critical path code.","","    @method _afterScrollDelayChange","    @param {EventFacade} e","    @protected","    **/","    _afterScrollDelayChange: function (e) {","        this._scrollDelay = e.newVal;","    },","","    /**","    Caches the `scrollMargin` value after that attribute changes to allow","    quicker lookups in critical path code.","","    @method _afterScrollMarginChange","    @param {EventFacade} e","    @protected","    **/","    _afterScrollMarginChange: function (e) {","        this._scrollMargin = e.newVal;","    },","","    /**","    Handles DOM `scroll` events on the window.","","    @method _afterWindowScroll","    @param {EventFacade} e","    @protected","    **/","    _afterWindowScroll: function () {","        this._refreshHostBoundingRect();","    }","}, {","    NS: 'scrollInfo',","","    ATTRS: {","        /**","        Number of milliseconds to wait after a native `scroll` event before","        firing local scroll events. If another native scroll event occurs during","        this time, previous events will be ignored. This ensures that we don't","        fire thousands of events when the user is scrolling quickly.","","        @attribute scrollDelay","        @type Number","        @default 50","        **/","        scrollDelay: {","            value: 50","        },","","        /**","        Additional margin in pixels beyond the onscreen region of the host node","        that should be considered \"onscreen\".","","        For example, if set to 50, then a `scrollToBottom` event would be fired","        when the user scrolls to within 50 pixels of the bottom of the","        scrollable region, even if they don't actually scroll completely to the","        very bottom pixel.","","        This margin also applies to the `getOffscreenNodes()` and","        `getOnscreenNodes()` methods by default.","","        @attribute scrollMargin","        @type Number","        @default 50","        **/","        scrollMargin: {","            value: 50","        }","    }","});","","","}, '3.13.0', {\"requires\": [\"array-extras\", \"base-build\", \"event-resize\", \"node-pluginhost\", \"plugin\", \"selector\"]});","","}());"]};
12 var __cov_$MuO_qLYo1Cy8JotuibTGA = __coverage__['build/node-scroll-info/node-scroll-info.js'];
13 __cov_$MuO_qLYo1Cy8JotuibTGA.s['1']++;YUI.add('node-scroll-info',function(Y,NAME){__cov_$MuO_qLYo1Cy8JotuibTGA.f['1']++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['2']++;var doc=Y.config.doc,win=Y.config.win;__cov_$MuO_qLYo1Cy8JotuibTGA.s['3']++;var EVT_SCROLL='scroll',EVT_SCROLL_DOWN='scrollDown',EVT_SCROLL_LEFT='scrollLeft',EVT_SCROLL_RIGHT='scrollRight',EVT_SCROLL_UP='scrollUp',EVT_SCROLL_TO_BOTTOM='scrollToBottom',EVT_SCROLL_TO_LEFT='scrollToLeft',EVT_SCROLL_TO_RIGHT='scrollToRight',EVT_SCROLL_TO_TOP='scrollToTop';__cov_$MuO_qLYo1Cy8JotuibTGA.s['4']++;Y.Plugin.ScrollInfo=Y.Base.create('scrollInfoPlugin',Y.Plugin.Base,[],{initializer:function(config){__cov_$MuO_qLYo1Cy8JotuibTGA.f['2']++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['5']++;this._host=config.host;__cov_$MuO_qLYo1Cy8JotuibTGA.s['6']++;this._hostIsBody=this._host.get('nodeName').toLowerCase()==='body';__cov_$MuO_qLYo1Cy8JotuibTGA.s['7']++;this._scrollDelay=this.get('scrollDelay');__cov_$MuO_qLYo1Cy8JotuibTGA.s['8']++;this._scrollMargin=this.get('scrollMargin');__cov_$MuO_qLYo1Cy8JotuibTGA.s['9']++;this._scrollNode=this._getScrollNode();__cov_$MuO_qLYo1Cy8JotuibTGA.s['10']++;this.refreshDimensions();__cov_$MuO_qLYo1Cy8JotuibTGA.s['11']++;this._lastScroll=this.getScrollInfo();__cov_$MuO_qLYo1Cy8JotuibTGA.s['12']++;this._bind();},destructor:function(){__cov_$MuO_qLYo1Cy8JotuibTGA.f['3']++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['13']++;new Y.EventHandle(this._events).detach();__cov_$MuO_qLYo1Cy8JotuibTGA.s['14']++;this._events=null;},getOffscreenNodes:function(selector,margin){__cov_$MuO_qLYo1Cy8JotuibTGA.f['4']++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['15']++;if(typeof margin==='undefined'){__cov_$MuO_qLYo1Cy8JotuibTGA.b['1'][0]++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['16']++;margin=this._scrollMargin;}else{__cov_$MuO_qLYo1Cy8JotuibTGA.b['1'][1]++;}__cov_$MuO_qLYo1Cy8JotuibTGA.s['17']++;var elements=Y.Selector.query((__cov_$MuO_qLYo1Cy8JotuibTGA.b['2'][0]++,selector)||(__cov_$MuO_qLYo1Cy8JotuibTGA.b['2'][1]++,'*'),this._host._node);__cov_$MuO_qLYo1Cy8JotuibTGA.s['18']++;return new Y.NodeList(Y.Array.filter(elements,function(el){__cov_$MuO_qLYo1Cy8JotuibTGA.f['5']++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['19']++;return!this._isElementOnscreen(el,margin);},this));},getOnscreenNodes:function(selector,margin){__cov_$MuO_qLYo1Cy8JotuibTGA.f['6']++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['20']++;if(typeof margin==='undefined'){__cov_$MuO_qLYo1Cy8JotuibTGA.b['3'][0]++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['21']++;margin=this._scrollMargin;}else{__cov_$MuO_qLYo1Cy8JotuibTGA.b['3'][1]++;}__cov_$MuO_qLYo1Cy8JotuibTGA.s['22']++;var elements=Y.Selector.query((__cov_$MuO_qLYo1Cy8JotuibTGA.b['4'][0]++,selector)||(__cov_$MuO_qLYo1Cy8JotuibTGA.b['4'][1]++,'*'),this._host._node);__cov_$MuO_qLYo1Cy8JotuibTGA.s['23']++;return new Y.NodeList(Y.Array.filter(elements,function(el){__cov_$MuO_qLYo1Cy8JotuibTGA.f['7']++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['24']++;return this._isElementOnscreen(el,margin);},this));},getScrollInfo:function(){__cov_$MuO_qLYo1Cy8JotuibTGA.f['8']++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['25']++;var domNode=this._scrollNode,lastScroll=this._lastScroll,margin=this._scrollMargin,scrollLeft=domNode.scrollLeft,scrollHeight=domNode.scrollHeight,scrollTop=domNode.scrollTop,scrollWidth=domNode.scrollWidth,scrollBottom=scrollTop+this._height,scrollRight=scrollLeft+this._width;__cov_$MuO_qLYo1Cy8JotuibTGA.s['26']++;return{atBottom:scrollBottom>scrollHeight-margin,atLeft:scrollLeft<margin,atRight:scrollRight>scrollWidth-margin,atTop:scrollTop<margin,isScrollDown:(__cov_$MuO_qLYo1Cy8JotuibTGA.b['5'][0]++,lastScroll)&&(__cov_$MuO_qLYo1Cy8JotuibTGA.b['5'][1]++,scrollTop>lastScroll.scrollTop),isScrollLeft:(__cov_$MuO_qLYo1Cy8JotuibTGA.b['6'][0]++,lastScroll)&&(__cov_$MuO_qLYo1Cy8JotuibTGA.b['6'][1]++,scrollLeft<lastScroll.scrollLeft),isScrollRight:(__cov_$MuO_qLYo1Cy8JotuibTGA.b['7'][0]++,lastScroll)&&(__cov_$MuO_qLYo1Cy8JotuibTGA.b['7'][1]++,scrollLeft>lastScroll.scrollLeft),isScrollUp:(__cov_$MuO_qLYo1Cy8JotuibTGA.b['8'][0]++,lastScroll)&&(__cov_$MuO_qLYo1Cy8JotuibTGA.b['8'][1]++,scrollTop<lastScroll.scrollTop),scrollBottom:scrollBottom,scrollHeight:scrollHeight,scrollLeft:scrollLeft,scrollRight:scrollRight,scrollTop:scrollTop,scrollWidth:scrollWidth};},isNodeOnscreen:function(node,margin){__cov_$MuO_qLYo1Cy8JotuibTGA.f['9']++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['27']++;node=Y.one(node);__cov_$MuO_qLYo1Cy8JotuibTGA.s['28']++;return!!((__cov_$MuO_qLYo1Cy8JotuibTGA.b['9'][0]++,node)&&(__cov_$MuO_qLYo1Cy8JotuibTGA.b['9'][1]++,this._isElementOnscreen(node._node,margin)));},refreshDimensions:function(){__cov_$MuO_qLYo1Cy8JotuibTGA.f['10']++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['29']++;var docEl=doc.documentElement;__cov_$MuO_qLYo1Cy8JotuibTGA.s['30']++;if(Y.UA.ios){__cov_$MuO_qLYo1Cy8JotuibTGA.b['10'][0]++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['31']++;this._winHeight=win.innerHeight;__cov_$MuO_qLYo1Cy8JotuibTGA.s['32']++;this._winWidth=win.innerWidth;}else{__cov_$MuO_qLYo1Cy8JotuibTGA.b['10'][1]++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['33']++;this._winHeight=docEl.clientHeight;__cov_$MuO_qLYo1Cy8JotuibTGA.s['34']++;this._winWidth=docEl.clientWidth;}__cov_$MuO_qLYo1Cy8JotuibTGA.s['35']++;if(this._hostIsBody){__cov_$MuO_qLYo1Cy8JotuibTGA.b['11'][0]++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['36']++;this._height=this._winHeight;__cov_$MuO_qLYo1Cy8JotuibTGA.s['37']++;this._width=this._winWidth;}else{__cov_$MuO_qLYo1Cy8JotuibTGA.b['11'][1]++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['38']++;this._height=this._scrollNode.clientHeight;__cov_$MuO_qLYo1Cy8JotuibTGA.s['39']++;this._width=this._scrollNode.clientWidth;}__cov_$MuO_qLYo1Cy8JotuibTGA.s['40']++;this._refreshHostBoundingRect();},_bind:function(){__cov_$MuO_qLYo1Cy8JotuibTGA.f['11']++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['41']++;var winNode=Y.one('win');__cov_$MuO_qLYo1Cy8JotuibTGA.s['42']++;this._events=[this.after({scrollDelayChange:this._afterScrollDelayChange,scrollMarginChange:this._afterScrollMarginChange}),winNode.on('windowresize',this._afterResize,this)];__cov_$MuO_qLYo1Cy8JotuibTGA.s['43']++;if(this._hostIsBody){__cov_$MuO_qLYo1Cy8JotuibTGA.b['12'][0]++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['44']++;this._events.push(winNode.after('scroll',this._afterHostScroll,this));}else{__cov_$MuO_qLYo1Cy8JotuibTGA.b['12'][1]++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['45']++;this._events.push(winNode.after('scroll',this._afterWindowScroll,this),this._host.after('scroll',this._afterHostScroll,this));}},_getScrollNode:function(){__cov_$MuO_qLYo1Cy8JotuibTGA.f['12']++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['46']++;return(__cov_$MuO_qLYo1Cy8JotuibTGA.b['14'][0]++,this._hostIsBody)&&(__cov_$MuO_qLYo1Cy8JotuibTGA.b['14'][1]++,!Y.UA.webkit)?(__cov_$MuO_qLYo1Cy8JotuibTGA.b['13'][0]++,doc.documentElement):(__cov_$MuO_qLYo1Cy8JotuibTGA.b['13'][1]++,Y.Node.getDOMNode(this._host));},_isElementOnscreen:function(el,margin){__cov_$MuO_qLYo1Cy8JotuibTGA.f['13']++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['47']++;var hostRect=this._hostRect,rect=el.getBoundingClientRect();__cov_$MuO_qLYo1Cy8JotuibTGA.s['48']++;if(typeof margin==='undefined'){__cov_$MuO_qLYo1Cy8JotuibTGA.b['15'][0]++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['49']++;margin=this._scrollMargin;}else{__cov_$MuO_qLYo1Cy8JotuibTGA.b['15'][1]++;}__cov_$MuO_qLYo1Cy8JotuibTGA.s['50']++;return!((__cov_$MuO_qLYo1Cy8JotuibTGA.b['16'][0]++,rect.top>hostRect.bottom+margin)||(__cov_$MuO_qLYo1Cy8JotuibTGA.b['16'][1]++,rect.bottom<hostRect.top-margin)||(__cov_$MuO_qLYo1Cy8JotuibTGA.b['16'][2]++,rect.right<hostRect.left-margin)||(__cov_$MuO_qLYo1Cy8JotuibTGA.b['16'][3]++,rect.left>hostRect.right+margin));},_refreshHostBoundingRect:function(){__cov_$MuO_qLYo1Cy8JotuibTGA.f['14']++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['51']++;var winHeight=this._winHeight,winWidth=this._winWidth,hostRect;__cov_$MuO_qLYo1Cy8JotuibTGA.s['52']++;if(this._hostIsBody){__cov_$MuO_qLYo1Cy8JotuibTGA.b['17'][0]++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['53']++;hostRect={bottom:winHeight,height:winHeight,left:0,right:winWidth,top:0,width:winWidth};__cov_$MuO_qLYo1Cy8JotuibTGA.s['54']++;this._isHostOnscreen=true;}else{__cov_$MuO_qLYo1Cy8JotuibTGA.b['17'][1]++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['55']++;hostRect=this._scrollNode.getBoundingClientRect();}__cov_$MuO_qLYo1Cy8JotuibTGA.s['56']++;this._hostRect=hostRect;},_triggerScroll:function(e){__cov_$MuO_qLYo1Cy8JotuibTGA.f['15']++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['57']++;var info=this.getScrollInfo(),facade=Y.merge(e,info),lastScroll=this._lastScroll;__cov_$MuO_qLYo1Cy8JotuibTGA.s['58']++;this._lastScroll=info;__cov_$MuO_qLYo1Cy8JotuibTGA.s['59']++;this.fire(EVT_SCROLL,facade);__cov_$MuO_qLYo1Cy8JotuibTGA.s['60']++;if(info.isScrollLeft){__cov_$MuO_qLYo1Cy8JotuibTGA.b['18'][0]++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['61']++;this.fire(EVT_SCROLL_LEFT,facade);}else{__cov_$MuO_qLYo1Cy8JotuibTGA.b['18'][1]++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['62']++;if(info.isScrollRight){__cov_$MuO_qLYo1Cy8JotuibTGA.b['19'][0]++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['63']++;this.fire(EVT_SCROLL_RIGHT,facade);}else{__cov_$MuO_qLYo1Cy8JotuibTGA.b['19'][1]++;}}__cov_$MuO_qLYo1Cy8JotuibTGA.s['64']++;if(info.isScrollUp){__cov_$MuO_qLYo1Cy8JotuibTGA.b['20'][0]++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['65']++;this.fire(EVT_SCROLL_UP,facade);}else{__cov_$MuO_qLYo1Cy8JotuibTGA.b['20'][1]++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['66']++;if(info.isScrollDown){__cov_$MuO_qLYo1Cy8JotuibTGA.b['21'][0]++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['67']++;this.fire(EVT_SCROLL_DOWN,facade);}else{__cov_$MuO_qLYo1Cy8JotuibTGA.b['21'][1]++;}}__cov_$MuO_qLYo1Cy8JotuibTGA.s['68']++;if((__cov_$MuO_qLYo1Cy8JotuibTGA.b['23'][0]++,info.atBottom)&&((__cov_$MuO_qLYo1Cy8JotuibTGA.b['23'][1]++,!lastScroll.atBottom)||(__cov_$MuO_qLYo1Cy8JotuibTGA.b['23'][2]++,info.scrollHeight>lastScroll.scrollHeight))){__cov_$MuO_qLYo1Cy8JotuibTGA.b['22'][0]++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['69']++;this.fire(EVT_SCROLL_TO_BOTTOM,facade);}else{__cov_$MuO_qLYo1Cy8JotuibTGA.b['22'][1]++;}__cov_$MuO_qLYo1Cy8JotuibTGA.s['70']++;if((__cov_$MuO_qLYo1Cy8JotuibTGA.b['25'][0]++,info.atLeft)&&(__cov_$MuO_qLYo1Cy8JotuibTGA.b['25'][1]++,!lastScroll.atLeft)){__cov_$MuO_qLYo1Cy8JotuibTGA.b['24'][0]++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['71']++;this.fire(EVT_SCROLL_TO_LEFT,facade);}else{__cov_$MuO_qLYo1Cy8JotuibTGA.b['24'][1]++;}__cov_$MuO_qLYo1Cy8JotuibTGA.s['72']++;if((__cov_$MuO_qLYo1Cy8JotuibTGA.b['27'][0]++,info.atRight)&&((__cov_$MuO_qLYo1Cy8JotuibTGA.b['27'][1]++,!lastScroll.atRight)||(__cov_$MuO_qLYo1Cy8JotuibTGA.b['27'][2]++,info.scrollWidth>lastScroll.scrollWidth))){__cov_$MuO_qLYo1Cy8JotuibTGA.b['26'][0]++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['73']++;this.fire(EVT_SCROLL_TO_RIGHT,facade);}else{__cov_$MuO_qLYo1Cy8JotuibTGA.b['26'][1]++;}__cov_$MuO_qLYo1Cy8JotuibTGA.s['74']++;if((__cov_$MuO_qLYo1Cy8JotuibTGA.b['29'][0]++,info.atTop)&&(__cov_$MuO_qLYo1Cy8JotuibTGA.b['29'][1]++,!lastScroll.atTop)){__cov_$MuO_qLYo1Cy8JotuibTGA.b['28'][0]++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['75']++;this.fire(EVT_SCROLL_TO_TOP,facade);}else{__cov_$MuO_qLYo1Cy8JotuibTGA.b['28'][1]++;}},_afterHostScroll:function(e){__cov_$MuO_qLYo1Cy8JotuibTGA.f['16']++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['76']++;var self=this;__cov_$MuO_qLYo1Cy8JotuibTGA.s['77']++;clearTimeout(this._scrollTimeout);__cov_$MuO_qLYo1Cy8JotuibTGA.s['78']++;this._scrollTimeout=setTimeout(function(){__cov_$MuO_qLYo1Cy8JotuibTGA.f['17']++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['79']++;self._triggerScroll(e);},this._scrollDelay);},_afterResize:function(){__cov_$MuO_qLYo1Cy8JotuibTGA.f['18']++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['80']++;this.refreshDimensions();},_afterScrollDelayChange:function(e){__cov_$MuO_qLYo1Cy8JotuibTGA.f['19']++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['81']++;this._scrollDelay=e.newVal;},_afterScrollMarginChange:function(e){__cov_$MuO_qLYo1Cy8JotuibTGA.f['20']++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['82']++;this._scrollMargin=e.newVal;},_afterWindowScroll:function(){__cov_$MuO_qLYo1Cy8JotuibTGA.f['21']++;__cov_$MuO_qLYo1Cy8JotuibTGA.s['83']++;this._refreshHostBoundingRect();}},{NS:'scrollInfo',ATTRS:{scrollDelay:{value:50},scrollMargin:{value:50}}});},'3.13.0',{'requires':['array-extras','base-build','event-resize','node-pluginhost','plugin','selector']});