{"version":3,"file":"cdk-scrolling.umd.js","sources":["cdk/scrolling.es5.js"],"sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { Directive, ElementRef, Injectable, NgModule, NgZone, Optional, Renderer2, SkipSelf } from '@angular/core';\nimport { Platform, PlatformModule } from '@angular/cdk/platform';\nimport { Subject } from 'rxjs/Subject';\nimport { Subscription } from 'rxjs/Subscription';\nimport { fromEvent } from 'rxjs/observable/fromEvent';\nimport { auditTime } from 'rxjs/operator/auditTime';\nimport { merge } from 'rxjs/observable/merge';\nimport { of } from 'rxjs/observable/of';\n\n/**\n * Time in ms to throttle the scrolling events by default.\n */\nvar DEFAULT_SCROLL_TIME = 20;\n/**\n * Service contained all registered Scrollable references and emits an event when any one of the\n * Scrollable references emit a scrolled event.\n */\nvar ScrollDispatcher = (function () {\n /**\n * @param {?} _ngZone\n * @param {?} _platform\n */\n function ScrollDispatcher(_ngZone, _platform) {\n this._ngZone = _ngZone;\n this._platform = _platform;\n /**\n * Subject for notifying that a registered scrollable reference element has been scrolled.\n */\n this._scrolled = new Subject();\n /**\n * Keeps track of the global `scroll` and `resize` subscriptions.\n */\n this._globalSubscription = null;\n /**\n * Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards.\n */\n this._scrolledCount = 0;\n /**\n * Map of all the scrollable references that are registered with the service and their\n * scroll event subscriptions.\n */\n this.scrollableReferences = new Map();\n }\n /**\n * Registers a Scrollable with the service and listens for its scrolled events. When the\n * scrollable is scrolled, the service emits the event in its scrolled observable.\n * @param {?} scrollable Scrollable instance to be registered.\n * @return {?}\n */\n ScrollDispatcher.prototype.register = function (scrollable) {\n var _this = this;\n var /** @type {?} */ scrollSubscription = scrollable.elementScrolled().subscribe(function () { return _this._notify(); });\n this.scrollableReferences.set(scrollable, scrollSubscription);\n };\n /**\n * Deregisters a Scrollable reference and unsubscribes from its scroll event observable.\n * @param {?} scrollable Scrollable instance to be deregistered.\n * @return {?}\n */\n ScrollDispatcher.prototype.deregister = function (scrollable) {\n var /** @type {?} */ scrollableReference = this.scrollableReferences.get(scrollable);\n if (scrollableReference) {\n scrollableReference.unsubscribe();\n this.scrollableReferences.delete(scrollable);\n }\n };\n /**\n * Subscribes to an observable that emits an event whenever any of the registered Scrollable\n * references (or window, document, or body) fire a scrolled event. Can provide a time in ms\n * to override the default \"throttle\" time.\n * @param {?=} auditTimeInMs\n * @param {?=} callback\n * @return {?}\n */\n ScrollDispatcher.prototype.scrolled = function (auditTimeInMs, callback) {\n var _this = this;\n if (auditTimeInMs === void 0) { auditTimeInMs = DEFAULT_SCROLL_TIME; }\n // Scroll events can only happen on the browser, so do nothing if we're not on the browser.\n if (!this._platform.isBrowser) {\n return Subscription.EMPTY;\n }\n // In the case of a 0ms delay, use an observable without auditTime\n // since it does add a perceptible delay in processing overhead.\n var /** @type {?} */ observable = auditTimeInMs > 0 ?\n auditTime.call(this._scrolled.asObservable(), auditTimeInMs) :\n this._scrolled.asObservable();\n this._scrolledCount++;\n if (!this._globalSubscription) {\n this._globalSubscription = this._ngZone.runOutsideAngular(function () {\n return fromEvent(window.document, 'scroll').subscribe(function () { return _this._notify(); });\n });\n }\n // Note that we need to do the subscribing from here, in order to be able to remove\n // the global event listeners once there are no more subscriptions.\n var /** @type {?} */ subscription = observable.subscribe(callback);\n subscription.add(function () {\n _this._scrolledCount--;\n if (_this._globalSubscription && !_this.scrollableReferences.size && !_this._scrolledCount) {\n _this._globalSubscription.unsubscribe();\n _this._globalSubscription = null;\n }\n });\n return subscription;\n };\n /**\n * Returns all registered Scrollables that contain the provided element.\n * @param {?} elementRef\n * @return {?}\n */\n ScrollDispatcher.prototype.getScrollContainers = function (elementRef) {\n var _this = this;\n var /** @type {?} */ scrollingContainers = [];\n this.scrollableReferences.forEach(function (_subscription, scrollable) {\n if (_this.scrollableContainsElement(scrollable, elementRef)) {\n scrollingContainers.push(scrollable);\n }\n });\n return scrollingContainers;\n };\n /**\n * Returns true if the element is contained within the provided Scrollable.\n * @param {?} scrollable\n * @param {?} elementRef\n * @return {?}\n */\n ScrollDispatcher.prototype.scrollableContainsElement = function (scrollable, elementRef) {\n var /** @type {?} */ element = elementRef.nativeElement;\n var /** @type {?} */ scrollableElement = scrollable.getElementRef().nativeElement;\n // Traverse through the element parents until we reach null, checking if any of the elements\n // are the scrollable's element.\n do {\n if (element == scrollableElement) {\n return true;\n }\n } while (element = element.parentElement);\n return false;\n };\n /**\n * Sends a notification that a scroll event has been fired.\n * @return {?}\n */\n ScrollDispatcher.prototype._notify = function () {\n this._scrolled.next();\n };\n ScrollDispatcher.decorators = [\n { type: Injectable },\n ];\n /**\n * @nocollapse\n */\n ScrollDispatcher.ctorParameters = function () { return [\n { type: NgZone, },\n { type: Platform, },\n ]; };\n return ScrollDispatcher;\n}());\n/**\n * \\@docs-private\n * @param {?} parentDispatcher\n * @param {?} ngZone\n * @param {?} platform\n * @return {?}\n */\nfunction SCROLL_DISPATCHER_PROVIDER_FACTORY(parentDispatcher, ngZone, platform) {\n return parentDispatcher || new ScrollDispatcher(ngZone, platform);\n}\n/**\n * \\@docs-private\n */\nvar SCROLL_DISPATCHER_PROVIDER = {\n // If there is already a ScrollDispatcher available, use that. Otherwise, provide a new one.\n provide: ScrollDispatcher,\n deps: [[new Optional(), new SkipSelf(), ScrollDispatcher], NgZone, Platform],\n useFactory: SCROLL_DISPATCHER_PROVIDER_FACTORY\n};\n\n/**\n * Sends an event when the directive's element is scrolled. Registers itself with the\n * ScrollDispatcher service to include itself as part of its collection of scrolling events that it\n * can be listened to through the service.\n */\nvar Scrollable = (function () {\n /**\n * @param {?} _elementRef\n * @param {?} _scroll\n * @param {?} _ngZone\n * @param {?} _renderer\n */\n function Scrollable(_elementRef, _scroll, _ngZone, _renderer) {\n this._elementRef = _elementRef;\n this._scroll = _scroll;\n this._ngZone = _ngZone;\n this._renderer = _renderer;\n this._elementScrolled = new Subject();\n }\n /**\n * @return {?}\n */\n Scrollable.prototype.ngOnInit = function () {\n var _this = this;\n this._scrollListener = this._ngZone.runOutsideAngular(function () {\n return _this._renderer.listen(_this.getElementRef().nativeElement, 'scroll', function (event) {\n _this._elementScrolled.next(event);\n });\n });\n this._scroll.register(this);\n };\n /**\n * @return {?}\n */\n Scrollable.prototype.ngOnDestroy = function () {\n this._scroll.deregister(this);\n if (this._scrollListener) {\n this._scrollListener();\n this._scrollListener = null;\n }\n };\n /**\n * Returns observable that emits when a scroll event is fired on the host element.\n * @return {?}\n */\n Scrollable.prototype.elementScrolled = function () {\n return this._elementScrolled.asObservable();\n };\n /**\n * @return {?}\n */\n Scrollable.prototype.getElementRef = function () {\n return this._elementRef;\n };\n Scrollable.decorators = [\n { type: Directive, args: [{\n selector: '[cdk-scrollable], [cdkScrollable]'\n },] },\n ];\n /**\n * @nocollapse\n */\n Scrollable.ctorParameters = function () { return [\n { type: ElementRef, },\n { type: ScrollDispatcher, },\n { type: NgZone, },\n { type: Renderer2, },\n ]; };\n return Scrollable;\n}());\n\n/**\n * Time in ms to throttle the resize events by default.\n */\nvar DEFAULT_RESIZE_TIME = 20;\n/**\n * Simple utility for getting the bounds of the browser viewport.\n * \\@docs-private\n */\nvar ViewportRuler = (function () {\n /**\n * @param {?} platform\n * @param {?} ngZone\n * @param {?} scrollDispatcher\n */\n function ViewportRuler(platform, ngZone, scrollDispatcher) {\n var _this = this;\n this._change = platform.isBrowser ? ngZone.runOutsideAngular(function () {\n return merge(fromEvent(window, 'resize'), fromEvent(window, 'orientationchange'));\n }) : of();\n // Subscribe to scroll and resize events and update the document rectangle on changes.\n this._invalidateCacheSubscriptions = [\n scrollDispatcher.scrolled(0, function () { return _this._cacheViewportGeometry(); }),\n this.change().subscribe(function () { return _this._cacheViewportGeometry(); })\n ];\n }\n /**\n * @return {?}\n */\n ViewportRuler.prototype.ngOnDestroy = function () {\n this._invalidateCacheSubscriptions.forEach(function (subscription) { return subscription.unsubscribe(); });\n };\n /**\n * Gets a ClientRect for the viewport's bounds.\n * @param {?=} documentRect\n * @return {?}\n */\n ViewportRuler.prototype.getViewportRect = function (documentRect) {\n if (documentRect === void 0) { documentRect = this._documentRect; }\n // Cache the document bounding rect so that we don't recompute it for multiple calls.\n if (!documentRect) {\n this._cacheViewportGeometry();\n documentRect = this._documentRect;\n }\n // Use the document element's bounding rect rather than the window scroll properties\n // (e.g. pageYOffset, scrollY) due to in issue in Chrome and IE where window scroll\n // properties and client coordinates (boundingClientRect, clientX/Y, etc.) are in different\n // conceptual viewports. Under most circumstances these viewports are equivalent, but they\n // can disagree when the page is pinch-zoomed (on devices that support touch).\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=489206#c4\n // We use the documentElement instead of the body because, by default (without a css reset)\n // browsers typically give the document body an 8px margin, which is not included in\n // getBoundingClientRect().\n var /** @type {?} */ scrollPosition = this.getViewportScrollPosition(documentRect);\n var /** @type {?} */ height = window.innerHeight;\n var /** @type {?} */ width = window.innerWidth;\n return {\n top: scrollPosition.top,\n left: scrollPosition.left,\n bottom: scrollPosition.top + height,\n right: scrollPosition.left + width,\n height: height,\n width: width,\n };\n };\n /**\n * Gets the (top, left) scroll position of the viewport.\n * @param {?=} documentRect\n * @return {?}\n */\n ViewportRuler.prototype.getViewportScrollPosition = function (documentRect) {\n if (documentRect === void 0) { documentRect = this._documentRect; }\n // Cache the document bounding rect so that we don't recompute it for multiple calls.\n if (!documentRect) {\n this._cacheViewportGeometry();\n documentRect = this._documentRect;\n }\n // The top-left-corner of the viewport is determined by the scroll position of the document\n // body, normally just (scrollLeft, scrollTop). However, Chrome and Firefox disagree about\n // whether `document.body` or `document.documentElement` is the scrolled element, so reading\n // `scrollTop` and `scrollLeft` is inconsistent. However, using the bounding rect of\n // `document.documentElement` works consistently, where the `top` and `left` values will\n // equal negative the scroll position.\n var /** @type {?} */ top = -((documentRect)).top || document.body.scrollTop || window.scrollY ||\n document.documentElement.scrollTop || 0;\n var /** @type {?} */ left = -((documentRect)).left || document.body.scrollLeft || window.scrollX ||\n document.documentElement.scrollLeft || 0;\n return { top: top, left: left };\n };\n /**\n * Returns a stream that emits whenever the size of the viewport changes.\n * @param {?=} throttleTime\n * @return {?}\n */\n ViewportRuler.prototype.change = function (throttleTime) {\n if (throttleTime === void 0) { throttleTime = DEFAULT_RESIZE_TIME; }\n return throttleTime > 0 ? auditTime.call(this._change, throttleTime) : this._change;\n };\n /**\n * Caches the latest client rectangle of the document element.\n * @return {?}\n */\n ViewportRuler.prototype._cacheViewportGeometry = function () {\n this._documentRect = document.documentElement.getBoundingClientRect();\n };\n ViewportRuler.decorators = [\n { type: Injectable },\n ];\n /**\n * @nocollapse\n */\n ViewportRuler.ctorParameters = function () { return [\n { type: Platform, },\n { type: NgZone, },\n { type: ScrollDispatcher, },\n ]; };\n return ViewportRuler;\n}());\n/**\n * \\@docs-private\n * @param {?} parentRuler\n * @param {?} platform\n * @param {?} ngZone\n * @param {?} scrollDispatcher\n * @return {?}\n */\nfunction VIEWPORT_RULER_PROVIDER_FACTORY(parentRuler, platform, ngZone, scrollDispatcher) {\n return parentRuler || new ViewportRuler(platform, ngZone, scrollDispatcher);\n}\n/**\n * \\@docs-private\n */\nvar VIEWPORT_RULER_PROVIDER = {\n // If there is already a ViewportRuler available, use that. Otherwise, provide a new one.\n provide: ViewportRuler,\n deps: [[new Optional(), new SkipSelf(), ViewportRuler], Platform, NgZone, ScrollDispatcher],\n useFactory: VIEWPORT_RULER_PROVIDER_FACTORY\n};\n\nvar ScrollDispatchModule = (function () {\n function ScrollDispatchModule() {\n }\n ScrollDispatchModule.decorators = [\n { type: NgModule, args: [{\n imports: [PlatformModule],\n exports: [Scrollable],\n declarations: [Scrollable],\n providers: [SCROLL_DISPATCHER_PROVIDER],\n },] },\n ];\n /**\n * @nocollapse\n */\n ScrollDispatchModule.ctorParameters = function () { return []; };\n return ScrollDispatchModule;\n}());\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { DEFAULT_SCROLL_TIME, ScrollDispatcher, SCROLL_DISPATCHER_PROVIDER_FACTORY, SCROLL_DISPATCHER_PROVIDER, Scrollable, DEFAULT_RESIZE_TIME, ViewportRuler, VIEWPORT_RULER_PROVIDER_FACTORY, VIEWPORT_RULER_PROVIDER, ScrollDispatchModule };\n//# sourceMappingURL=scrolling.es5.js.map\n"],"names":["Subject","Subscription","auditTime","fromEvent","Injectable","NgZone","Platform","Optional","SkipSelf","Directive","ElementRef","Renderer2","merge","of","NgModule","PlatformModule"],"mappings":";;;;;;;;;;;;;AAgBA;;;AAGA,IAAI,mBAAmB,GAAG,EAAE,CAAC;;;;;AAK7B,IAAI,gBAAgB,IAAI,YAAY;;;;;IAKhC,SAAS,gBAAgB,CAAC,OAAO,EAAE,SAAS,EAAE;QAC1C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;;;;QAI3B,IAAI,CAAC,SAAS,GAAG,IAAIA,oBAAO,EAAE,CAAC;;;;QAI/B,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC;;;;QAIhC,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC;;;;;QAKxB,IAAI,CAAC,oBAAoB,GAAG,IAAI,GAAG,EAAE,CAAC;KACzC;;;;;;;IAOD,gBAAgB,CAAC,SAAS,CAAC,QAAQ,GAAG,UAAU,UAAU,EAAE;QACxD,IAAI,KAAK,GAAG,IAAI,CAAC;QACjB,qBAAqB,kBAAkB,GAAG,UAAU,CAAC,eAAe,EAAE,CAAC,SAAS,CAAC,YAAY,EAAE,OAAO,KAAK,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;QAC1H,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAAC;KACjE,CAAC;;;;;;IAMF,gBAAgB,CAAC,SAAS,CAAC,UAAU,GAAG,UAAU,UAAU,EAAE;QAC1D,qBAAqB,mBAAmB,GAAG,IAAI,CAAC,oBAAoB,CAAC,GAAG,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