blob: 5520a26023f705f1323ebdc7e690bf9cde892580 [file] [log] [blame]
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/cdk/coercion"),require("@angular/cdk/scrolling"),require("@angular/common"),require("@angular/core"),require("rxjs"),require("rxjs/operators"),require("@angular/cdk/platform"),require("@angular/cdk/bidi"),require("@angular/cdk/portal"),require("@angular/cdk/keycodes")):"function"==typeof define&&define.amd?define("@angular/cdk/overlay",["exports","@angular/cdk/coercion","@angular/cdk/scrolling","@angular/common","@angular/core","rxjs","rxjs/operators","@angular/cdk/platform","@angular/cdk/bidi","@angular/cdk/portal","@angular/cdk/keycodes"],e):e((t.ng=t.ng||{},t.ng.cdk=t.ng.cdk||{},t.ng.cdk.overlay={}),t.ng.cdk.coercion,t.ng.cdk.scrolling,t.ng.common,t.ng.core,t.rxjs,t.rxjs.operators,t.ng.cdk.platform,t.ng.cdk.bidi,t.ng.cdk.portal,t.ng.cdk.keycodes)}(this,function(t,e,i,o,n,r,s,a,h,l,c){"use strict";function p(t,e){function i(){this.constructor=t}w(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}function u(){return Error("Scroll strategy has already been attached.")}function d(t,e){return e.some(function(e){var i=t.bottom<e.top,o=t.top>e.bottom,n=t.right<e.left,r=t.left>e.right;return i||o||n||r})}function _(t,e){return e.some(function(e){var i=t.top<e.top,o=t.bottom>e.bottom,n=t.left<e.left,r=t.right>e.right;return i||o||n||r})}function f(t,e){if("top"!==e&&"bottom"!==e&&"center"!==e)throw Error("ConnectedPosition: Invalid "+t+' "'+e+'". Expected "top", "bottom" or "center".')}function y(t,e){if("start"!==e&&"end"!==e&&"center"!==e)throw Error("ConnectedPosition: Invalid "+t+' "'+e+'". Expected "start", "end" or "center".')}function g(t,e){return t||new B(e)}function v(t,e){return t||new M(e)}function m(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function b(t){return function(){return t.scrollStrategies.reposition()}}var w=function(t,e){return(w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},O=function(){return O=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++){e=arguments[i];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},O.apply(this,arguments)},C=function(){function t(t,e){this._viewportRuler=t,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=e}return t.prototype.attach=function(){},t.prototype.enable=function(){if(this._canBeEnabled()){var t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=e.coerceCssPixelValue(-this._previousScrollPosition.left),t.style.top=e.coerceCssPixelValue(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}},t.prototype.disable=function(){if(this._isEnabled){var t=this._document.documentElement,e=this._document.body,i=t.style,o=e.style,n=i.scrollBehavior||"",r=o.scrollBehavior||"";this._isEnabled=!1,i.left=this._previousHTMLStyles.left,i.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),i.scrollBehavior=o.scrollBehavior="auto",window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),i.scrollBehavior=n,o.scrollBehavior=r}},t.prototype._canBeEnabled=function(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;var t=this._document.body,e=this._viewportRuler.getViewportSize();return t.scrollHeight>e.height||t.scrollWidth>e.width},t}(),P=function(){function t(t,e,i,o){var n=this;this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=i,this._config=o,this._scrollSubscription=null,this._detach=function(){n.disable(),n._overlayRef.hasAttached()&&n._ngZone.run(function(){return n._overlayRef.detach()})}}return t.prototype.attach=function(t){if(this._overlayRef)throw u();this._overlayRef=t},t.prototype.enable=function(){var t=this;if(!this._scrollSubscription){var e=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(function(){var e=t._viewportRuler.getViewportScrollPosition().top;Math.abs(e-t._initialScrollPosition)>t._config.threshold?t._detach():t._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}},t.prototype.disable=function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)},t.prototype.detach=function(){this.disable(),this._overlayRef=null},t}(),k=function(){function t(){}return t.prototype.enable=function(){},t.prototype.disable=function(){},t.prototype.attach=function(){},t}(),S=function(){function t(t,e,i,o){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=i,this._config=o,this._scrollSubscription=null}return t.prototype.attach=function(t){if(this._overlayRef)throw u();this._overlayRef=t},t.prototype.enable=function(){var t=this;if(!this._scrollSubscription){var e=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(e).subscribe(function(){if(t._overlayRef.updatePosition(),t._config&&t._config.autoClose){var e=t._overlayRef.overlayElement.getBoundingClientRect(),i=t._viewportRuler.getViewportSize(),o=i.width,n=i.height;d(e,[{width:o,height:n,bottom:n,right:o,top:0,left:0}])&&(t.disable(),t._ngZone.run(function(){return t._overlayRef.detach()}))}})}},t.prototype.disable=function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)},t.prototype.detach=function(){this.disable(),this._overlayRef=null},t}(),E=function(){function t(t,e,i,o){var n=this;this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=i,this.noop=function(){return new k},this.close=function(t){return new P(n._scrollDispatcher,n._ngZone,n._viewportRuler,t)},this.block=function(){return new C(n._viewportRuler,n._document)},this.reposition=function(t){return new S(n._scrollDispatcher,n._viewportRuler,n._ngZone,t)},this._document=o}return t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:i.ScrollDispatcher},{type:i.ViewportRuler},{type:n.NgZone},{type:void 0,decorators:[{type:n.Inject,args:[o.DOCUMENT]}]}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(i.ScrollDispatcher),n.ɵɵinject(i.ViewportRuler),n.ɵɵinject(n.NgZone),n.ɵɵinject(o.DOCUMENT))},token:t,providedIn:"root"}),t}(),R=function(){function t(t){if(this.scrollStrategy=new k,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,t)for(var e=Object.keys(t),i=0,o=e;i<o.length;i++){var n=o[i];void 0!==t[n]&&(this[n]=t[n])}}return t}(),x=function(){function t(t,e,i,o,n){this.offsetX=i,this.offsetY=o,this.panelClass=n,this.originX=t.originX,this.originY=t.originY,this.overlayX=e.overlayX,this.overlayY=e.overlayY}return t}(),j=function(){function t(){}return t}(),D=function(){function t(t,e){this.connectionPair=t,this.scrollableViewProperties=e}return t.ctorParameters=function(){return[{type:x},{type:j,decorators:[{type:n.Optional}]}]},t}(),B=function(){function t(t){var e=this;this._attachedOverlays=[],this._keydownListener=function(t){for(var i=e._attachedOverlays,o=i.length-1;o>-1;o--)if(i[o]._keydownEventSubscriptions>0){i[o]._keydownEvents.next(t);break}},this._document=t}return t.prototype.ngOnDestroy=function(){this._detach()},t.prototype.add=function(t){this.remove(t),this._isAttached||(this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0),this._attachedOverlays.push(t)},t.prototype.remove=function(t){var e=this._attachedOverlays.indexOf(t);e>-1&&this._attachedOverlays.splice(e,1),0===this._attachedOverlays.length&&this._detach()},t.prototype._detach=function(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[o.DOCUMENT]}]}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(o.DOCUMENT))},token:t,providedIn:"root"}),t}(),I={provide:B,deps:[[new n.Optional,new n.SkipSelf,B],o.DOCUMENT],useFactory:g},M=function(){function t(t){this._document=t}return t.prototype.ngOnDestroy=function(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)},t.prototype.getContainerElement=function(){return this._containerElement||this._createContainer(),this._containerElement},t.prototype._createContainer=function(){var t=this._document.createElement("div");t.classList.add("cdk-overlay-container"),this._document.body.appendChild(t),this._containerElement=t},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[o.DOCUMENT]}]}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(o.DOCUMENT))},token:t,providedIn:"root"}),t}(),V={provide:M,deps:[[new n.Optional,new n.SkipSelf,M],o.DOCUMENT],useFactory:v},L=function(){function t(t,e,i,o,n,s,a,h){var l=this;this._portalOutlet=t,this._host=e,this._pane=i,this._config=o,this._ngZone=n,this._keyboardDispatcher=s,this._document=a,this._location=h,this._backdropElement=null,this._backdropClick=new r.Subject,this._attachments=new r.Subject,this._detachments=new r.Subject,this._locationChanges=r.Subscription.EMPTY,this._backdropClickHandler=function(t){return l._backdropClick.next(t)},this._keydownEventsObservable=new r.Observable(function(t){var e=l._keydownEvents.subscribe(t);return l._keydownEventSubscriptions++,function(){e.unsubscribe(),l._keydownEventSubscriptions--}}),this._keydownEvents=new r.Subject,this._keydownEventSubscriptions=0,o.scrollStrategy&&(this._scrollStrategy=o.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=o.positionStrategy}return Object.defineProperty(t.prototype,"overlayElement",{get:function(){return this._pane},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"backdropElement",{get:function(){return this._backdropElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hostElement",{get:function(){return this._host},enumerable:!0,configurable:!0}),t.prototype.attach=function(t){var e=this,i=this._portalOutlet.attach(t);return this._positionStrategy&&this._positionStrategy.attach(this),!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.asObservable().pipe(s.take(1)).subscribe(function(){e.hasAttached()&&e.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&this._location&&(this._locationChanges=this._location.subscribe(function(){return e.dispose()})),i},t.prototype.detach=function(){if(this.hasAttached()){this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();var t=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),t}},t.prototype.dispose=function(){var t=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this.detachBackdrop(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._host&&this._host.parentNode&&(this._host.parentNode.removeChild(this._host),this._host=null),this._previousHostParent=this._pane=null,t&&this._detachments.next(),this._detachments.complete()},t.prototype.hasAttached=function(){return this._portalOutlet.hasAttached()},t.prototype.backdropClick=function(){return this._backdropClick.asObservable()},t.prototype.attachments=function(){return this._attachments.asObservable()},t.prototype.detachments=function(){return this._detachments.asObservable()},t.prototype.keydownEvents=function(){return this._keydownEventsObservable},t.prototype.getConfig=function(){return this._config},t.prototype.updatePosition=function(){this._positionStrategy&&this._positionStrategy.apply()},t.prototype.updatePositionStrategy=function(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))},t.prototype.updateSize=function(t){this._config=O({},this._config,t),this._updateElementSize()},t.prototype.setDirection=function(t){this._config=O({},this._config,{direction:t}),this._updateElementDirection()},t.prototype.addPanelClass=function(t){this._pane&&this._toggleClasses(this._pane,t,!0)},t.prototype.removePanelClass=function(t){this._pane&&this._toggleClasses(this._pane,t,!1)},t.prototype.getDirection=function(){var t=this._config.direction;return t?"string"==typeof t?t:t.value:"ltr"},t.prototype.updateScrollStrategy=function(t){t!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=t,this.hasAttached()&&(t.attach(this),t.enable()))},t.prototype._updateElementDirection=function(){this._host.setAttribute("dir",this.getDirection())},t.prototype._updateElementSize=function(){var t=this._pane.style;t.width=e.coerceCssPixelValue(this._config.width),t.height=e.coerceCssPixelValue(this._config.height),t.minWidth=e.coerceCssPixelValue(this._config.minWidth),t.minHeight=e.coerceCssPixelValue(this._config.minHeight),t.maxWidth=e.coerceCssPixelValue(this._config.maxWidth),t.maxHeight=e.coerceCssPixelValue(this._config.maxHeight)},t.prototype._togglePointerEvents=function(t){this._pane.style.pointerEvents=t?"auto":"none"},t.prototype._attachBackdrop=function(){var t=this;this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(function(){requestAnimationFrame(function(){t._backdropElement&&t._backdropElement.classList.add("cdk-overlay-backdrop-showing")})}):this._backdropElement.classList.add("cdk-overlay-backdrop-showing")},t.prototype._updateStackingOrder=function(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)},t.prototype.detachBackdrop=function(){var t=this,e=this._backdropElement;if(e){var i,o=function(){e&&(e.removeEventListener("click",t._backdropClickHandler),e.removeEventListener("transitionend",o),e.parentNode&&e.parentNode.removeChild(e)),t._backdropElement==e&&(t._backdropElement=null),t._config.backdropClass&&t._toggleClasses(e,t._config.backdropClass,!1),clearTimeout(i)};e.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(function(){e.addEventListener("transitionend",o)}),e.style.pointerEvents="none",i=this._ngZone.runOutsideAngular(function(){return setTimeout(o,500)})}},t.prototype._toggleClasses=function(t,i,o){var n=t.classList;e.coerceArray(i).forEach(function(t){o?n.add(t):n.remove(t)})},t.prototype._detachContentWhenStable=function(){var t=this;this._ngZone.runOutsideAngular(function(){var e=t._ngZone.onStable.asObservable().pipe(s.takeUntil(r.merge(t._attachments,t._detachments))).subscribe(function(){t._pane&&t._host&&0!==t._pane.children.length||(t._pane&&t._config.panelClass&&t._toggleClasses(t._pane,t._config.panelClass,!1),t._host&&t._host.parentElement&&(t._previousHostParent=t._host.parentElement,t._previousHostParent.removeChild(t._host)),e.unsubscribe())})})},t.prototype._disposeScrollStrategy=function(){var t=this._scrollStrategy;t&&(t.disable(),t.detach&&t.detach())},t}(),X=function(){function t(t,e,i,o,n){this._viewportRuler=e,this._document=i,this._platform=o,this._overlayContainer=n,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new r.Subject,this._resizeSubscription=r.Subscription.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges.asObservable(),this.setOrigin(t)}return Object.defineProperty(t.prototype,"positions",{get:function(){return this._preferredPositions},enumerable:!0,configurable:!0}),t.prototype.attach=function(t){var e=this;if(this._overlayRef&&t!==this._overlayRef)throw Error("This position strategy is already attached to an overlay");this._validatePositions(),t.hostElement.classList.add("cdk-overlay-connected-position-bounding-box"),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(function(){e._isInitialRender=!0,e.apply()})},t.prototype.apply=function(){if(!this._isDisposed&&this._platform.isBrowser){if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect();for(var t,e=this._originRect,i=this._overlayRect,o=this._viewportRect,n=[],r=0,s=this._preferredPositions;r<s.length;r++){var a=s[r],h=this._getOriginPoint(e,a),l=this._getOverlayPoint(h,i,a),c=this._getOverlayFit(l,i,o,a);if(c.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,h);this._canFitWithFlexibleDimensions(c,l,o)?n.push({position:a,origin:h,overlayRect:i,boundingBoxRect:this._calculateBoundingBoxRect(h,a)}):(!t||t.overlayFit.visibleArea<c.visibleArea)&&(t={overlayFit:c,overlayPoint:l,originPoint:h,position:a,overlayRect:i})}if(n.length){for(var p=null,u=-1,d=0,_=n;d<_.length;d++){var f=_[d],y=f.boundingBoxRect.width*f.boundingBoxRect.height*(f.position.weight||1);y>u&&(u=y,p=f)}return this._isPushed=!1,void this._applyPosition(p.position,p.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(t.position,t.originPoint);this._applyPosition(t.position,t.originPoint)}},t.prototype.detach=function(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()},t.prototype.dispose=function(){this._isDisposed||(this._boundingBox&&m(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove("cdk-overlay-connected-position-bounding-box"),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)},t.prototype.reapplyLastPosition=function(){if(!this._isDisposed&&(!this._platform||this._platform.isBrowser)){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect();var t=this._lastPosition||this._preferredPositions[0],e=this._getOriginPoint(this._originRect,t);this._applyPosition(t,e)}},t.prototype.withScrollableContainers=function(t){return this._scrollables=t,this},t.prototype.withPositions=function(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this},t.prototype.withViewportMargin=function(t){return this._viewportMargin=t,this},t.prototype.withFlexibleDimensions=function(t){return void 0===t&&(t=!0),this._hasFlexibleDimensions=t,this},t.prototype.withGrowAfterOpen=function(t){return void 0===t&&(t=!0),this._growAfterOpen=t,this},t.prototype.withPush=function(t){return void 0===t&&(t=!0),this._canPush=t,this},t.prototype.withLockedPosition=function(t){return void 0===t&&(t=!0),this._positionLocked=t,this},t.prototype.setOrigin=function(t){return this._origin=t,this},t.prototype.withDefaultOffsetX=function(t){return this._offsetX=t,this},t.prototype.withDefaultOffsetY=function(t){return this._offsetY=t,this},t.prototype.withTransformOriginOn=function(t){return this._transformOriginSelector=t,this},t.prototype._getOriginPoint=function(t,e){var i;if("center"==e.originX)i=t.left+t.width/2;else{var o=this._isRtl()?t.right:t.left,n=this._isRtl()?t.left:t.right;i="start"==e.originX?o:n}var r;return r="center"==e.originY?t.top+t.height/2:"top"==e.originY?t.top:t.bottom,{x:i,y:r}},t.prototype._getOverlayPoint=function(t,e,i){var o;o="center"==i.overlayX?-e.width/2:"start"===i.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width;var n;return n="center"==i.overlayY?-e.height/2:"top"==i.overlayY?0:-e.height,{x:t.x+o,y:t.y+n}},t.prototype._getOverlayFit=function(t,e,i,o){var n=t.x,r=t.y,s=this._getOffset(o,"x"),a=this._getOffset(o,"y");s&&(n+=s),a&&(r+=a);var h=0-n,l=n+e.width-i.width,c=0-r,p=r+e.height-i.height,u=this._subtractOverflows(e.width,h,l),d=this._subtractOverflows(e.height,c,p),_=u*d;return{visibleArea:_,isCompletelyWithinViewport:e.width*e.height===_,fitsInViewportVertically:d===e.height,fitsInViewportHorizontally:u==e.width}},t.prototype._canFitWithFlexibleDimensions=function(t,e,i){if(this._hasFlexibleDimensions){var o=i.bottom-e.y,n=i.right-e.x,r=this._overlayRef.getConfig().minHeight,s=this._overlayRef.getConfig().minWidth,a=t.fitsInViewportVertically||null!=r&&r<=o,h=t.fitsInViewportHorizontally||null!=s&&s<=n;return a&&h}},t.prototype._pushOverlayOnScreen=function(t,e,i){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};var o=this._viewportRect,n=Math.max(t.x+e.width-o.right,0),r=Math.max(t.y+e.height-o.bottom,0),s=Math.max(o.top-i.top-t.y,0),a=Math.max(o.left-i.left-t.x,0),h=0,l=0;return h=e.width<=o.width?a||-n:t.x<this._viewportMargin?o.left-i.left-t.x:0,l=e.height<=o.height?s||-r:t.y<this._viewportMargin?o.top-i.top-t.y:0,this._previousPushAmount={x:h,y:l},{x:t.x+h,y:t.y+l}},t.prototype._applyPosition=function(t,e){if(this._setTransformOrigin(t),this._setOverlayElementStyles(e,t),this._setBoundingBoxStyles(e,t),t.panelClass&&this._addPanelClasses(t.panelClass),this._lastPosition=t,this._positionChanges.observers.length){var i=this._getScrollVisibility(),o=new D(t,i);this._positionChanges.next(o)}this._isInitialRender=!1},t.prototype._setTransformOrigin=function(t){if(this._transformOriginSelector){var e,i=this._boundingBox.querySelectorAll(this._transformOriginSelector),o=t.overlayY;e="center"===t.overlayX?"center":this._isRtl()?"start"===t.overlayX?"right":"left":"start"===t.overlayX?"left":"right";for(var n=0;n<i.length;n++)i[n].style.transformOrigin=e+" "+o}},t.prototype._calculateBoundingBoxRect=function(t,e){var i,o,n,r=this._viewportRect,s=this._isRtl();if("top"===e.overlayY)o=t.y,i=r.height-o+this._viewportMargin;else if("bottom"===e.overlayY)n=r.height-t.y+2*this._viewportMargin,i=r.height-n+this._viewportMargin;else{var a=Math.min(r.bottom-t.y+r.top,t.y),h=this._lastBoundingBoxSize.height;i=2*a,o=t.y-a,i>h&&!this._isInitialRender&&!this._growAfterOpen&&(o=t.y-h/2)}var l,c,p,u="start"===e.overlayX&&!s||"end"===e.overlayX&&s,d="end"===e.overlayX&&!s||"start"===e.overlayX&&s;if(d)p=r.width-t.x+this._viewportMargin,l=t.x-this._viewportMargin;else if(u)c=t.x,l=r.right-t.x;else{var a=Math.min(r.right-t.x+r.left,t.x),_=this._lastBoundingBoxSize.width;l=2*a,c=t.x-a,l>_&&!this._isInitialRender&&!this._growAfterOpen&&(c=t.x-_/2)}return{top:o,left:c,bottom:n,right:p,width:l,height:i}},t.prototype._setBoundingBoxStyles=function(t,i){var o=this._calculateBoundingBoxRect(t,i);this._isInitialRender||this._growAfterOpen||(o.height=Math.min(o.height,this._lastBoundingBoxSize.height),o.width=Math.min(o.width,this._lastBoundingBoxSize.width));var n={};if(this._hasExactPosition())n.top=n.left="0",n.bottom=n.right="",n.width=n.height="100%";else{var r=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;n.height=e.coerceCssPixelValue(o.height),n.top=e.coerceCssPixelValue(o.top),n.bottom=e.coerceCssPixelValue(o.bottom),n.width=e.coerceCssPixelValue(o.width),n.left=e.coerceCssPixelValue(o.left),n.right=e.coerceCssPixelValue(o.right),"center"===i.overlayX?n.alignItems="center":n.alignItems="end"===i.overlayX?"flex-end":"flex-start","center"===i.overlayY?n.justifyContent="center":n.justifyContent="bottom"===i.overlayY?"flex-end":"flex-start",r&&(n.maxHeight=e.coerceCssPixelValue(r)),s&&(n.maxWidth=e.coerceCssPixelValue(s))}this._lastBoundingBoxSize=o,m(this._boundingBox.style,n)},t.prototype._resetBoundingBoxStyles=function(){m(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})},t.prototype._resetOverlayElementStyles=function(){m(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})},t.prototype._setOverlayElementStyles=function(t,e){var i={};if(this._hasExactPosition()){var o=this._viewportRuler.getViewportScrollPosition();m(i,this._getExactOverlayY(e,t,o)),m(i,this._getExactOverlayX(e,t,o))}else i.position="static";var n="",r=this._getOffset(e,"x"),s=this._getOffset(e,"y");r&&(n+="translateX("+r+"px) "),s&&(n+="translateY("+s+"px)"),i.transform=n.trim(),this._hasFlexibleDimensions&&this._overlayRef.getConfig().maxHeight&&(i.maxHeight=""),this._hasFlexibleDimensions&&this._overlayRef.getConfig().maxWidth&&(i.maxWidth=""),m(this._pane.style,i)},t.prototype._getExactOverlayY=function(t,i,o){var n={top:null,bottom:null},r=this._getOverlayPoint(i,this._overlayRect,t);this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,o));var s=this._overlayContainer.getContainerElement().getBoundingClientRect().top;if(r.y-=s,"bottom"===t.overlayY){var a=this._document.documentElement.clientHeight;n.bottom=a-(r.y+this._overlayRect.height)+"px"}else n.top=e.coerceCssPixelValue(r.y);return n},t.prototype._getExactOverlayX=function(t,i,o){var n={left:null,right:null},r=this._getOverlayPoint(i,this._overlayRect,t);this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,o));if("right"===(this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left")){var s=this._document.documentElement.clientWidth;n.right=s-(r.x+this._overlayRect.width)+"px"}else n.left=e.coerceCssPixelValue(r.x);return n},t.prototype._getScrollVisibility=function(){var t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),i=this._scrollables.map(function(t){return t.getElementRef().nativeElement.getBoundingClientRect()});return{isOriginClipped:_(t,i),isOriginOutsideView:d(t,i),isOverlayClipped:_(e,i),isOverlayOutsideView:d(e,i)}},t.prototype._subtractOverflows=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return e.reduce(function(t,e){return t-Math.max(e,0)},t)},t.prototype._getNarrowedViewportRect=function(){var t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+t-this._viewportMargin,bottom:i.top+e-this._viewportMargin,width:t-2*this._viewportMargin,height:e-2*this._viewportMargin}},t.prototype._isRtl=function(){return"rtl"===this._overlayRef.getDirection()},t.prototype._hasExactPosition=function(){return!this._hasFlexibleDimensions||this._isPushed},t.prototype._getOffset=function(t,e){return"x"===e?null==t.offsetX?this._offsetX:t.offsetX:null==t.offsetY?this._offsetY:t.offsetY},t.prototype._validatePositions=function(){if(!this._preferredPositions.length)throw Error("FlexibleConnectedPositionStrategy: At least one position is required.");this._preferredPositions.forEach(function(t){y("originX",t.originX),f("originY",t.originY),y("overlayX",t.overlayX),f("overlayY",t.overlayY)})},t.prototype._addPanelClasses=function(t){var i=this;this._pane&&e.coerceArray(t).forEach(function(t){""!==t&&-1===i._appliedPanelClasses.indexOf(t)&&(i._appliedPanelClasses.push(t),i._pane.classList.add(t))})},t.prototype._clearPanelClasses=function(){var t=this;this._pane&&(this._appliedPanelClasses.forEach(function(e){t._pane.classList.remove(e)}),this._appliedPanelClasses=[])},t.prototype._getOriginRect=function(){var t=this._origin;return t instanceof n.ElementRef?t.nativeElement.getBoundingClientRect():t instanceof HTMLElement?t.getBoundingClientRect():{top:t.y,bottom:t.y,left:t.x,right:t.x,height:0,width:0}},t}(),Y=function(){function t(t,e,i,o,n,r,s){this._preferredPositions=[],this._positionStrategy=new X(i,o,n,r,s).withFlexibleDimensions(!1).withPush(!1).withViewportMargin(0),this.withFallbackPosition(t,e)}return Object.defineProperty(t.prototype,"_isRtl",{get:function(){return"rtl"===this._overlayRef.getDirection()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onPositionChange",{get:function(){return this._positionStrategy.positionChanges},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"positions",{get:function(){return this._preferredPositions},enumerable:!0,configurable:!0}),t.prototype.attach=function(t){this._overlayRef=t,this._positionStrategy.attach(t),this._direction&&(t.setDirection(this._direction),this._direction=null)},t.prototype.dispose=function(){this._positionStrategy.dispose()},t.prototype.detach=function(){this._positionStrategy.detach()},t.prototype.apply=function(){this._positionStrategy.apply()},t.prototype.recalculateLastPosition=function(){this._positionStrategy.reapplyLastPosition()},t.prototype.withScrollableContainers=function(t){this._positionStrategy.withScrollableContainers(t)},t.prototype.withFallbackPosition=function(t,e,i,o){var n=new x(t,e,i,o);return this._preferredPositions.push(n),this._positionStrategy.withPositions(this._preferredPositions),this},t.prototype.withDirection=function(t){return this._overlayRef?this._overlayRef.setDirection(t):this._direction=t,this},t.prototype.withOffsetX=function(t){return this._positionStrategy.withDefaultOffsetX(t),this},t.prototype.withOffsetY=function(t){return this._positionStrategy.withDefaultOffsetY(t),this},t.prototype.withLockedPosition=function(t){return this._positionStrategy.withLockedPosition(t),this},t.prototype.withPositions=function(t){return this._preferredPositions=t.slice(),this._positionStrategy.withPositions(this._preferredPositions),this},t.prototype.setOrigin=function(t){return this._positionStrategy.setOrigin(t),this},t}(),A=function(){function t(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._leftOffset="",this._rightOffset="",this._alignItems="",this._justifyContent="",this._width="",this._height=""}return t.prototype.attach=function(t){var e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add("cdk-global-overlay-wrapper"),this._isDisposed=!1},t.prototype.top=function(t){return void 0===t&&(t=""),this._bottomOffset="",this._topOffset=t,
this._alignItems="flex-start",this},t.prototype.left=function(t){return void 0===t&&(t=""),this._rightOffset="",this._leftOffset=t,this._justifyContent="flex-start",this},t.prototype.bottom=function(t){return void 0===t&&(t=""),this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this},t.prototype.right=function(t){return void 0===t&&(t=""),this._leftOffset="",this._rightOffset=t,this._justifyContent="flex-end",this},t.prototype.width=function(t){return void 0===t&&(t=""),this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this},t.prototype.height=function(t){return void 0===t&&(t=""),this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this},t.prototype.centerHorizontally=function(t){return void 0===t&&(t=""),this.left(t),this._justifyContent="center",this},t.prototype.centerVertically=function(t){return void 0===t&&(t=""),this.top(t),this._alignItems="center",this},t.prototype.apply=function(){if(this._overlayRef&&this._overlayRef.hasAttached()){var t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig();t.position=this._cssPosition,t.marginLeft="100%"===i.width?"0":this._leftOffset,t.marginTop="100%"===i.height?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=this._rightOffset,"100%"===i.width?e.justifyContent="flex-start":"center"===this._justifyContent?e.justifyContent="center":"rtl"===this._overlayRef.getConfig().direction?"flex-start"===this._justifyContent?e.justifyContent="flex-end":"flex-end"===this._justifyContent&&(e.justifyContent="flex-start"):e.justifyContent=this._justifyContent,e.alignItems="100%"===i.height?"flex-start":this._alignItems}},t.prototype.dispose=function(){if(!this._isDisposed&&this._overlayRef){var t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,i=e.style;e.classList.remove("cdk-global-overlay-wrapper"),i.justifyContent=i.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}},t}(),F=function(){function t(t,e,i,o){this._viewportRuler=t,this._document=e,this._platform=i,this._overlayContainer=o}return t.prototype.global=function(){return new A},t.prototype.connectedTo=function(t,e,i){return new Y(e,i,t,this._viewportRuler,this._document,this._platform,this._overlayContainer)},t.prototype.flexibleConnectedTo=function(t){return new X(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:i.ViewportRuler},{type:void 0,decorators:[{type:n.Inject,args:[o.DOCUMENT]}]},{type:a.Platform},{type:M}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(i.ViewportRuler),n.ɵɵinject(o.DOCUMENT),n.ɵɵinject(a.Platform),n.ɵɵinject(M))},token:t,providedIn:"root"}),t}(),H=0,N=function(){function t(t,e,i,o,n,r,s,a,h,l){this.scrollStrategies=t,this._overlayContainer=e,this._componentFactoryResolver=i,this._positionBuilder=o,this._keyboardDispatcher=n,this._injector=r,this._ngZone=s,this._document=a,this._directionality=h,this._location=l}return t.prototype.create=function(t){var e=this._createHostElement(),i=this._createPaneElement(e),o=this._createPortalOutlet(i),n=new R(t);return n.direction=n.direction||this._directionality.value,new L(o,e,i,n,this._ngZone,this._keyboardDispatcher,this._document,this._location)},t.prototype.position=function(){return this._positionBuilder},t.prototype._createPaneElement=function(t){var e=this._document.createElement("div");return e.id="cdk-overlay-"+H++,e.classList.add("cdk-overlay-pane"),t.appendChild(e),e},t.prototype._createHostElement=function(){var t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t},t.prototype._createPortalOutlet=function(t){return this._appRef||(this._appRef=this._injector.get(n.ApplicationRef)),new l.DomPortalOutlet(t,this._componentFactoryResolver,this._appRef,this._injector)},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[{type:E},{type:M},{type:n.ComponentFactoryResolver},{type:F},{type:B},{type:n.Injector},{type:n.NgZone},{type:void 0,decorators:[{type:n.Inject,args:[o.DOCUMENT]}]},{type:h.Directionality},{type:o.Location,decorators:[{type:n.Optional}]}]},t}(),T=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],W=new n.InjectionToken("cdk-connected-overlay-scroll-strategy"),z=function(){function t(t){this.elementRef=t}return t.decorators=[{type:n.Directive,args:[{selector:"[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]",exportAs:"cdkOverlayOrigin"}]}],t.ctorParameters=function(){return[{type:n.ElementRef}]},t}(),Z=function(){function t(t,e,i,o,s){this._overlay=t,this._dir=s,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=r.Subscription.EMPTY,this.viewportMargin=0,this.open=!1,this.backdropClick=new n.EventEmitter,this.positionChange=new n.EventEmitter,this.attach=new n.EventEmitter,this.detach=new n.EventEmitter,this.overlayKeydown=new n.EventEmitter,this._templatePortal=new l.TemplatePortal(e,i),this._scrollStrategyFactory=o,this.scrollStrategy=this._scrollStrategyFactory()}return Object.defineProperty(t.prototype,"offsetX",{get:function(){return this._offsetX},set:function(t){this._offsetX=t,this._position&&this._updatePositionStrategy(this._position)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"offsetY",{get:function(){return this._offsetY},set:function(t){this._offsetY=t,this._position&&this._updatePositionStrategy(this._position)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasBackdrop",{get:function(){return this._hasBackdrop},set:function(t){this._hasBackdrop=e.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lockPosition",{get:function(){return this._lockPosition},set:function(t){this._lockPosition=e.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"flexibleDimensions",{get:function(){return this._flexibleDimensions},set:function(t){this._flexibleDimensions=e.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"growAfterOpen",{get:function(){return this._growAfterOpen},set:function(t){this._growAfterOpen=e.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"push",{get:function(){return this._push},set:function(t){this._push=e.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"overlayRef",{get:function(){return this._overlayRef},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dir",{get:function(){return this._dir?this._dir.value:"ltr"},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this._overlayRef&&this._overlayRef.dispose(),this._backdropSubscription.unsubscribe()},t.prototype.ngOnChanges=function(t){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),t.origin&&this.open&&this._position.apply()),t.open&&(this.open?this._attachOverlay():this._detachOverlay())},t.prototype._createOverlay=function(){var t=this;this.positions&&this.positions.length||(this.positions=T),this._overlayRef=this._overlay.create(this._buildConfig()),this._overlayRef.keydownEvents().subscribe(function(e){t.overlayKeydown.next(e),e.keyCode!==c.ESCAPE||c.hasModifierKey(e)||(e.preventDefault(),t._detachOverlay())})},t.prototype._buildConfig=function(){var t=this._position=this._createPositionStrategy(),e=new R({direction:this._dir,positionStrategy:t,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(e.width=this.width),(this.height||0===this.height)&&(e.height=this.height),(this.minWidth||0===this.minWidth)&&(e.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(e.minHeight=this.minHeight),this.backdropClass&&(e.backdropClass=this.backdropClass),this.panelClass&&(e.panelClass=this.panelClass),e},t.prototype._updatePositionStrategy=function(t){var e=this,i=this.positions.map(function(t){return{originX:t.originX,originY:t.originY,overlayX:t.overlayX,overlayY:t.overlayY,offsetX:t.offsetX||e.offsetX,offsetY:t.offsetY||e.offsetY,panelClass:t.panelClass||void 0}});return t.setOrigin(this.origin.elementRef).withPositions(i).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition)},t.prototype._createPositionStrategy=function(){var t=this,e=this._overlay.position().flexibleConnectedTo(this.origin.elementRef);return this._updatePositionStrategy(e),e.positionChanges.subscribe(function(e){return t.positionChange.emit(e)}),e},t.prototype._attachOverlay=function(){var t=this;this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||(this._overlayRef.attach(this._templatePortal),this.attach.emit()),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(function(e){t.backdropClick.emit(e)}):this._backdropSubscription.unsubscribe()},t.prototype._detachOverlay=function(){this._overlayRef&&(this._overlayRef.detach(),this.detach.emit()),this._backdropSubscription.unsubscribe()},t.decorators=[{type:n.Directive,args:[{selector:"[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]",exportAs:"cdkConnectedOverlay"}]}],t.ctorParameters=function(){return[{type:N},{type:n.TemplateRef},{type:n.ViewContainerRef},{type:void 0,decorators:[{type:n.Inject,args:[W]}]},{type:h.Directionality,decorators:[{type:n.Optional}]}]},t.propDecorators={origin:[{type:n.Input,args:["cdkConnectedOverlayOrigin"]}],positions:[{type:n.Input,args:["cdkConnectedOverlayPositions"]}],offsetX:[{type:n.Input,args:["cdkConnectedOverlayOffsetX"]}],offsetY:[{type:n.Input,args:["cdkConnectedOverlayOffsetY"]}],width:[{type:n.Input,args:["cdkConnectedOverlayWidth"]}],height:[{type:n.Input,args:["cdkConnectedOverlayHeight"]}],minWidth:[{type:n.Input,args:["cdkConnectedOverlayMinWidth"]}],minHeight:[{type:n.Input,args:["cdkConnectedOverlayMinHeight"]}],backdropClass:[{type:n.Input,args:["cdkConnectedOverlayBackdropClass"]}],panelClass:[{type:n.Input,args:["cdkConnectedOverlayPanelClass"]}],viewportMargin:[{type:n.Input,args:["cdkConnectedOverlayViewportMargin"]}],scrollStrategy:[{type:n.Input,args:["cdkConnectedOverlayScrollStrategy"]}],open:[{type:n.Input,args:["cdkConnectedOverlayOpen"]}],hasBackdrop:[{type:n.Input,args:["cdkConnectedOverlayHasBackdrop"]}],lockPosition:[{type:n.Input,args:["cdkConnectedOverlayLockPosition"]}],flexibleDimensions:[{type:n.Input,args:["cdkConnectedOverlayFlexibleDimensions"]}],growAfterOpen:[{type:n.Input,args:["cdkConnectedOverlayGrowAfterOpen"]}],push:[{type:n.Input,args:["cdkConnectedOverlayPush"]}],backdropClick:[{type:n.Output}],positionChange:[{type:n.Output}],attach:[{type:n.Output}],detach:[{type:n.Output}],overlayKeydown:[{type:n.Output}]},t}(),U={provide:W,deps:[N],useFactory:b},q=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{imports:[h.BidiModule,l.PortalModule,i.ScrollingModule],exports:[Z,z,i.ScrollingModule],declarations:[Z,z],providers:[N,U]}]}],t}(),K=[N,F,I,i.VIEWPORT_RULER_PROVIDER,V,U],G=function(t){function e(e){return t.call(this,e)||this}return p(e,t),e.prototype.ngOnDestroy=function(){t.prototype.ngOnDestroy.call(this),this._fullScreenEventName&&this._fullScreenListener&&this._document.removeEventListener(this._fullScreenEventName,this._fullScreenListener)},e.prototype._createContainer=function(){var e=this;t.prototype._createContainer.call(this),this._adjustParentForFullscreenChange(),this._addFullscreenChangeListener(function(){return e._adjustParentForFullscreenChange()})},e.prototype._adjustParentForFullscreenChange=function(){if(this._containerElement){(this.getFullscreenElement()||this._document.body).appendChild(this._containerElement)}},e.prototype._addFullscreenChangeListener=function(t){var e=this._getEventName();e&&(this._fullScreenListener&&this._document.removeEventListener(e,this._fullScreenListener),this._document.addEventListener(e,t),this._fullScreenListener=t)},e.prototype._getEventName=function(){return this._fullScreenEventName||(this._document.fullscreenEnabled?this._fullScreenEventName="fullscreenchange":this._document.webkitFullscreenEnabled?this._fullScreenEventName="webkitfullscreenchange":this._document.mozFullScreenEnabled?this._fullScreenEventName="mozfullscreenchange":this._document.msFullscreenEnabled&&(this._fullScreenEventName="MSFullscreenChange")),this._fullScreenEventName},e.prototype.getFullscreenElement=function(){return this._document.fullscreenElement||this._document.webkitFullscreenElement||this._document.mozFullScreenElement||this._document.msFullscreenElement||null},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[o.DOCUMENT]}]}]},e.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(o.DOCUMENT))},token:e,providedIn:"root"}),e}(M);t.ViewportRuler=i.ViewportRuler,t.VIEWPORT_RULER_PROVIDER=i.VIEWPORT_RULER_PROVIDER,t.CdkScrollable=i.CdkScrollable,t.ScrollDispatcher=i.ScrollDispatcher,t.Overlay=N,t.OverlayContainer=M,t.CdkOverlayOrigin=z,t.CdkConnectedOverlay=Z,t.FullscreenOverlayContainer=G,t.OverlayRef=L,t.OverlayKeyboardDispatcher=B,t.OverlayPositionBuilder=F,t.GlobalPositionStrategy=A,t.ConnectedPositionStrategy=Y,t.FlexibleConnectedPositionStrategy=X,t.OverlayConfig=R,t.validateVerticalPosition=f,t.validateHorizontalPosition=y,t.ConnectionPositionPair=x,t.ScrollingVisibility=j,t.ConnectedOverlayPositionChange=D,t.ScrollStrategyOptions=E,t.RepositionScrollStrategy=S,t.CloseScrollStrategy=P,t.NoopScrollStrategy=k,t.BlockScrollStrategy=C,t.OverlayModule=q,t.OVERLAY_PROVIDERS=K,tg=I,tf=g,tb=V,ta=v,tc=W,te=U,td=b,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=cdk-overlay.umd.min.js.map