blob: 62226926b44ada6f4a037e32e5c68aaadfc57865 [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(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/animations"),require("@angular/cdk/a11y"),require("@angular/cdk/bidi"),require("@angular/cdk/coercion"),require("@angular/cdk/collections"),require("@angular/cdk/keycodes"),require("@angular/cdk/overlay"),require("@angular/cdk/scrolling"),require("@angular/core"),require("@angular/forms"),require("@angular/material/core"),require("@angular/material/form-field"),require("rxjs"),require("rxjs/operators"),require("@angular/common")):"function"==typeof define&&define.amd?define("@angular/material/select",["exports","@angular/animations","@angular/cdk/a11y","@angular/cdk/bidi","@angular/cdk/coercion","@angular/cdk/collections","@angular/cdk/keycodes","@angular/cdk/overlay","@angular/cdk/scrolling","@angular/core","@angular/forms","@angular/material/core","@angular/material/form-field","rxjs","rxjs/operators","@angular/common"],t):t((e.ng=e.ng||{},e.ng.material=e.ng.material||{},e.ng.material.select={}),e.ng.animations,e.ng.cdk.a11y,e.ng.cdk.bidi,e.ng.cdk.coercion,e.ng.cdk.collections,e.ng.cdk.keycodes,e.ng.cdk.overlay,e.ng.cdk.scrolling,e.ng.core,e.ng.forms,e.ng.material.core,e.ng.material.formField,e.rxjs,e.rxjs.operators,e.ng.common)}(this,function(e,t,i,n,r,o,a,s,l,c,p,u,h,d,g,f){"use strict";function _(e,t){function i(){this.constructor=e}O(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}function m(){return Error("Cannot change `multiple` mode of select after initialization.")}function y(){return Error("Value must be an array in multiple-selection mode.")}function v(){return Error("`compareWith` must be a function.")}function b(e){return function(){return e.scrollStrategies.reposition()}}var O=function(e,t){return(O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},C={transformPanelWrap:t.trigger("transformPanelWrap",[t.transition("* => void",t.query("@transformPanel",[t.animateChild()],{optional:!0}))]),transformPanel:t.trigger("transformPanel",[t.state("void",t.style({transform:"scaleY(0.8)",minWidth:"100%",opacity:0})),t.state("showing",t.style({opacity:1,minWidth:"calc(100% + 32px)",transform:"scaleY(1)"})),t.state("showing-multiple",t.style({opacity:1,minWidth:"calc(100% + 64px)",transform:"scaleY(1)"})),t.transition("void => *",t.animate("120ms cubic-bezier(0, 0, 0.2, 1)")),t.transition("* => void",t.animate("100ms 25ms linear",t.style({opacity:0})))]),fadeInContent:t.trigger("fadeInContent",[t.state("showing",t.style({opacity:1})),t.transition("void => showing",[t.style({opacity:0}),t.animate("150ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},w=C.transformPanel,k=C.fadeInContent,M=0;e.SELECT_MULTIPLE_PANEL_PADDING_X=0;var E=new c.InjectionToken("mat-select-scroll-strategy"),I={provide:E,deps:[s.Overlay],useFactory:b},S=function(){function e(e,t){this.source=e,this.value=t}return e}(),P=function(){function e(e,t,i,n,r){this._elementRef=e,this._defaultErrorStateMatcher=t,this._parentForm=i,this._parentFormGroup=n,this.ngControl=r}return e}(),x=u.mixinDisableRipple(u.mixinTabIndex(u.mixinDisabled(u.mixinErrorState(P)))),A=function(){function e(){}return e.decorators=[{type:c.Directive,args:[{selector:"mat-select-trigger"}]}],e}(),D=function(t){function f(e,i,n,r,o,a,s,l,p,u,h,f,_){var m=t.call(this,o,r,s,l,u)||this;return m._viewportRuler=e,m._changeDetectorRef=i,m._ngZone=n,m._dir=a,m._parentFormField=p,m.ngControl=u,m._liveAnnouncer=_,m._panelOpen=!1,m._required=!1,m._scrollTop=0,m._multiple=!1,m._compareWith=function(e,t){return e===t},m._uid="mat-select-"+M++,m._destroy=new d.Subject,m._triggerFontSize=0,m._onChange=function(){},m._onTouched=function(){},m._optionIds="",m._transformOrigin="top",m._panelDoneAnimatingStream=new d.Subject,m._offsetY=0,m._positions=[{originX:"start",originY:"top",overlayX:"start",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"start",overlayY:"bottom"}],m._disableOptionCentering=!1,m._focused=!1,m.controlType="mat-select",m.ariaLabel="",m.optionSelectionChanges=d.defer(function(){var e=m.options;return e?e.changes.pipe(g.startWith(e),g.switchMap(function(){return d.merge.apply(void 0,e.map(function(e){return e.onSelectionChange}))})):m._ngZone.onStable.asObservable().pipe(g.take(1),g.switchMap(function(){return m.optionSelectionChanges}))}),m.openedChange=new c.EventEmitter,m._openedStream=m.openedChange.pipe(g.filter(function(e){return e}),g.map(function(){})),m._closedStream=m.openedChange.pipe(g.filter(function(e){return!e}),g.map(function(){})),m.selectionChange=new c.EventEmitter,m.valueChange=new c.EventEmitter,m.ngControl&&(m.ngControl.valueAccessor=m),m._scrollStrategyFactory=f,m._scrollStrategy=m._scrollStrategyFactory(),m.tabIndex=parseInt(h)||0,m.id=m.id,m}return _(f,t),Object.defineProperty(f.prototype,"focused",{get:function(){return this._focused||this._panelOpen},set:function(e){this._focused=e},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"placeholder",{get:function(){return this._placeholder},set:function(e){this._placeholder=e,this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"required",{get:function(){return this._required},set:function(e){this._required=r.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"multiple",{get:function(){return this._multiple},set:function(e){if(this._selectionModel)throw m();this._multiple=r.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"disableOptionCentering",{get:function(){return this._disableOptionCentering},set:function(e){this._disableOptionCentering=r.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"compareWith",{get:function(){return this._compareWith},set:function(e){if("function"!=typeof e)throw v();this._compareWith=e,this._selectionModel&&this._initializeSelection()},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"value",{get:function(){return this._value},set:function(e){e!==this._value&&(this.writeValue(e),this._value=e)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e||this._uid,this.stateChanges.next()},enumerable:!0,configurable:!0}),f.prototype.ngOnInit=function(){var e=this;this._selectionModel=new o.SelectionModel(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(g.distinctUntilChanged(),g.takeUntil(this._destroy)).subscribe(function(){e.panelOpen?(e._scrollTop=0,e.openedChange.emit(!0)):(e.openedChange.emit(!1),e.overlayDir.offsetX=0,e._changeDetectorRef.markForCheck())}),this._viewportRuler.change().pipe(g.takeUntil(this._destroy)).subscribe(function(){e._panelOpen&&(e._triggerRect=e.trigger.nativeElement.getBoundingClientRect(),e._changeDetectorRef.markForCheck())})},f.prototype.ngAfterContentInit=function(){var e=this;this._initKeyManager(),this._selectionModel.onChange.pipe(g.takeUntil(this._destroy)).subscribe(function(e){e.added.forEach(function(e){return e.select()}),e.removed.forEach(function(e){return e.deselect()})}),this.options.changes.pipe(g.startWith(null),g.takeUntil(this._destroy)).subscribe(function(){e._resetOptions(),e._initializeSelection()})},f.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState()},f.prototype.ngOnChanges=function(e){e.disabled&&this.stateChanges.next()},f.prototype.ngOnDestroy=function(){this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()},f.prototype.toggle=function(){this.panelOpen?this.close():this.open()},f.prototype.open=function(){var e=this;!this.disabled&&this.options&&this.options.length&&!this._panelOpen&&(this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement).fontSize||"0"),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._calculateOverlayPosition(),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this._ngZone.onStable.asObservable().pipe(g.take(1)).subscribe(function(){e._triggerFontSize&&e.overlayDir.overlayRef&&e.overlayDir.overlayRef.overlayElement&&(e.overlayDir.overlayRef.overlayElement.style.fontSize=e._triggerFontSize+"px")}))},f.prototype.close=function(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())},f.prototype.writeValue=function(e){this.options&&this._setSelectionByValue(e)},f.prototype.registerOnChange=function(e){this._onChange=e},f.prototype.registerOnTouched=function(e){this._onTouched=e},f.prototype.setDisabledState=function(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()},Object.defineProperty(f.prototype,"panelOpen",{get:function(){return this._panelOpen},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"selected",{get:function(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"triggerValue",{get:function(){if(this.empty)return"";if(this._multiple){var e=this._selectionModel.selected.map(function(e){return e.viewValue});return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue},enumerable:!0,configurable:!0}),f.prototype._isRtl=function(){return!!this._dir&&"rtl"===this._dir.value},f.prototype._handleKeydown=function(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))},f.prototype._handleClosedKeydown=function(e){var t=e.keyCode,i=t===a.DOWN_ARROW||t===a.UP_ARROW||t===a.LEFT_ARROW||t===a.RIGHT_ARROW,n=t===a.ENTER||t===a.SPACE,r=this._keyManager;if(n&&!a.hasModifierKey(e)||(this.multiple||e.altKey)&&i)e.preventDefault(),this.open();else if(!this.multiple){var o=this.selected;t===a.HOME||t===a.END?(t===a.HOME?r.setFirstItemActive():r.setLastItemActive(),e.preventDefault()):r.onKeydown(e);var s=this.selected;this._liveAnnouncer&&s&&o!==s&&this._liveAnnouncer.announce(s.viewValue,1e4)}},f.prototype._handleOpenKeydown=function(e){var t=e.keyCode,i=t===a.DOWN_ARROW||t===a.UP_ARROW,n=this._keyManager;if(t===a.HOME||t===a.END)e.preventDefault(),t===a.HOME?n.setFirstItemActive():n.setLastItemActive();else if(i&&e.altKey)e.preventDefault(),this.close();else if(t!==a.ENTER&&t!==a.SPACE||!n.activeItem||a.hasModifierKey(e))if(this._multiple&&t===a.A&&e.ctrlKey){e.preventDefault();var r=this.options.some(function(e){return!e.disabled&&!e.selected});this.options.forEach(function(e){e.disabled||(r?e.select():e.deselect())})}else{var o=n.activeItemIndex;n.onKeydown(e),this._multiple&&i&&e.shiftKey&&n.activeItem&&n.activeItemIndex!==o&&n.activeItem._selectViaInteraction()}else e.preventDefault(),n.activeItem._selectViaInteraction()},f.prototype._onFocus=function(){this.disabled||(this._focused=!0,this.stateChanges.next())},f.prototype._onBlur=function(){this._focused=!1,this.disabled||this.panelOpen||(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())},f.prototype._onAttached=function(){var e=this;this.overlayDir.positionChange.pipe(g.take(1)).subscribe(function(){e._setPseudoCheckboxPaddingSize(),e._changeDetectorRef.detectChanges(),e._calculateOverlayOffsetX(),e.panel.nativeElement.scrollTop=e._scrollTop})},f.prototype._getPanelTheme=function(){return this._parentFormField?"mat-"+this._parentFormField.color:""},f.prototype._setPseudoCheckboxPaddingSize=function(){if(!e.SELECT_MULTIPLE_PANEL_PADDING_X&&this.multiple){var t=this.panel.nativeElement.querySelector(".mat-pseudo-checkbox");t&&(e.SELECT_MULTIPLE_PANEL_PADDING_X=24+t.offsetWidth)}},Object.defineProperty(f.prototype,"empty",{get:function(){return!this._selectionModel||this._selectionModel.isEmpty()},enumerable:!0,configurable:!0}),f.prototype._initializeSelection=function(){var e=this;Promise.resolve().then(function(){e._setSelectionByValue(e.ngControl?e.ngControl.value:e._value),e.stateChanges.next()})},f.prototype._setSelectionByValue=function(e){var t=this;if(this.multiple&&e){if(!Array.isArray(e))throw y();this._selectionModel.clear(),e.forEach(function(e){return t._selectValue(e)}),this._sortValues()}else{this._selectionModel.clear();var i=this._selectValue(e);i&&this._keyManager.setActiveItem(i)}this._changeDetectorRef.markForCheck()},f.prototype._selectValue=function(e){var t=this,i=this.options.find(function(i){try{return null!=i.value&&t._compareWith(i.value,e)}catch(e){return c.isDevMode()&&console.warn(e),!1}});return i&&this._selectionModel.select(i),i},f.prototype._initKeyManager=function(){var e=this;this._keyManager=new i.ActiveDescendantKeyManager(this.options).withTypeAhead().withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.pipe(g.takeUntil(this._destroy)).subscribe(function(){e.focus(),e.close()}),this._keyManager.change.pipe(g.takeUntil(this._destroy)).subscribe(function(){e._panelOpen&&e.panel?e._scrollActiveOptionIntoView():e._panelOpen||e.multiple||!e._keyManager.activeItem||e._keyManager.activeItem._selectViaInteraction()})},f.prototype._resetOptions=function(){var e=this,t=d.merge(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(g.takeUntil(t)).subscribe(function(t){e._onSelect(t.source,t.isUserInput),t.isUserInput&&!e.multiple&&e._panelOpen&&(e.close(),e.focus())}),d.merge.apply(void 0,this.options.map(function(e){return e._stateChanges})).pipe(g.takeUntil(t)).subscribe(function(){e._changeDetectorRef.markForCheck(),e.stateChanges.next()}),this._setOptionIds()},f.prototype._onSelect=function(e,t){var i=this._selectionModel.isSelected(e);null!=e.value||this._multiple?(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e),t&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),t&&this.focus())):(e.deselect(),this._selectionModel.clear(),this._propagateChanges(e.value)),i!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()},f.prototype._sortValues=function(){var e=this;if(this.multiple){var t=this.options.toArray();this._selectionModel.sort(function(i,n){return e.sortComparator?e.sortComparator(i,n,t):t.indexOf(i)-t.indexOf(n)}),this.stateChanges.next()}},f.prototype._propagateChanges=function(e){var t=null;t=this.multiple?this.selected.map(function(e){return e.value}):this.selected?this.selected.value:e,this._value=t,this.valueChange.emit(t),this._onChange(t),this.selectionChange.emit(new S(this,t)),this._changeDetectorRef.markForCheck()},f.prototype._setOptionIds=function(){this._optionIds=this.options.map(function(e){return e.id}).join(" ")},f.prototype._highlightCorrectOption=function(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._selectionModel.selected[0]))},f.prototype._scrollActiveOptionIntoView=function(){var e=this._keyManager.activeItemIndex||0,t=u._countGroupLabelsBeforeOption(e,this.options,this.optionGroups);this.panel.nativeElement.scrollTop=u._getOptionScrollPosition(e+t,this._getItemHeight(),this.panel.nativeElement.scrollTop,256)},f.prototype.focus=function(){this._elementRef.nativeElement.focus()},f.prototype._getOptionIndex=function(e){return this.options.reduce(function(t,i,n){return void 0===t?e===i?n:void 0:t},void 0)},f.prototype._calculateOverlayPosition=function(){var e=this._getItemHeight(),t=this._getItemCount(),i=Math.min(t*e,256),n=t*e,r=n-i,o=this.empty?0:this._getOptionIndex(this._selectionModel.selected[0]);o+=u._countGroupLabelsBeforeOption(o,this.options,this.optionGroups);var a=i/2;this._scrollTop=this._calculateOverlayScroll(o,a,r),this._offsetY=this._calculateOverlayOffsetY(o,a,r),this._checkOverlayWithinViewport(r)},f.prototype._calculateOverlayScroll=function(e,t,i){var n=this._getItemHeight(),r=n*e,o=n/2,a=r-t+o;return Math.min(Math.max(0,a),i)},f.prototype._getAriaLabel=function(){return this.ariaLabelledby?null:this.ariaLabel||this.placeholder},f.prototype._getAriaLabelledby=function(){return this.ariaLabelledby?this.ariaLabelledby:this._parentFormField&&this._parentFormField._hasFloatingLabel()&&!this._getAriaLabel()?this._parentFormField._labelId||null:null},f.prototype._getAriaActiveDescendant=function(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null},f.prototype._calculateOverlayOffsetX=function(){var t,i=this.overlayDir.overlayRef.overlayElement.getBoundingClientRect(),n=this._viewportRuler.getViewportSize(),r=this._isRtl(),o=this.multiple?e.SELECT_MULTIPLE_PANEL_PADDING_X+16:32;if(this.multiple)t=e.SELECT_MULTIPLE_PANEL_PADDING_X;else{var a=this._selectionModel.selected[0]||this.options.first;t=a&&a.group?32:16}r||(t*=-1);var s=0-(i.left+t-(r?o:0)),l=i.right+t-n.width+(r?0:o);s>0?t+=s+8:l>0&&(t-=l+8),this.overlayDir.offsetX=Math.round(t),this.overlayDir.overlayRef.updatePosition()},f.prototype._calculateOverlayOffsetY=function(e,t,i){var n,r=this._getItemHeight(),o=(r-this._triggerRect.height)/2,a=Math.floor(256/r);if(this._disableOptionCentering)return 0;if(0===this._scrollTop)n=e*r;else if(this._scrollTop===i){var s=this._getItemCount()-a,l=e-s,c=r-(this._getItemCount()*r-256)%r;n=l*r+c}else n=t-r/2;return Math.round(-1*n-o)},f.prototype._checkOverlayWithinViewport=function(e){var t=this._getItemHeight(),i=this._viewportRuler.getViewportSize(),n=this._triggerRect.top-8,r=i.height-this._triggerRect.bottom-8,o=Math.abs(this._offsetY),a=Math.min(this._getItemCount()*t,256),s=a-o-this._triggerRect.height;s>r?this._adjustPanelUp(s,r):o>n?this._adjustPanelDown(o,n,e):this._transformOrigin=this._getOriginBasedOnOption()},f.prototype._adjustPanelUp=function(e,t){var i=Math.round(e-t);this._scrollTop-=i,this._offsetY-=i,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop<=0&&(this._scrollTop=0,this._offsetY=0,this._transformOrigin="50% bottom 0px")},f.prototype._adjustPanelDown=function(e,t,i){var n=Math.round(e-t);if(this._scrollTop+=n,this._offsetY+=n,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop>=i)return this._scrollTop=i,this._offsetY=0,void(this._transformOrigin="50% top 0px")},f.prototype._getOriginBasedOnOption=function(){var e=this._getItemHeight(),t=(e-this._triggerRect.height)/2;return"50% "+(Math.abs(this._offsetY)-t+e/2)+"px 0px"},f.prototype._getItemCount=function(){return this.options.length+this.optionGroups.length},f.prototype._getItemHeight=function(){return 3*this._triggerFontSize},f.prototype.setDescribedByIds=function(e){this._ariaDescribedby=e.join(" ")},f.prototype.onContainerClick=function(){this.focus(),this.open()},Object.defineProperty(f.prototype,"shouldLabelFloat",{get:function(){return this._panelOpen||!this.empty},enumerable:!0,configurable:!0}),f.decorators=[{type:c.Component,args:[{selector:"mat-select",exportAs:"matSelect",template:'<div cdk-overlay-origin class="mat-select-trigger" aria-hidden="true" (click)="toggle()" #origin="cdkOverlayOrigin" #trigger><div class="mat-select-value" [ngSwitch]="empty"><span class="mat-select-placeholder" *ngSwitchCase="true">{{placeholder || \' \'}}</span> <span class="mat-select-value-text" *ngSwitchCase="false" [ngSwitch]="!!customTrigger"><span *ngSwitchDefault>{{triggerValue || \' \'}}</span><ng-content select="mat-select-trigger" *ngSwitchCase="true"></ng-content></span></div><div class="mat-select-arrow-wrapper"><div class="mat-select-arrow"></div></div></div><ng-template cdk-connected-overlay cdkConnectedOverlayLockPosition cdkConnectedOverlayHasBackdrop cdkConnectedOverlayBackdropClass="cdk-overlay-transparent-backdrop" [cdkConnectedOverlayScrollStrategy]="_scrollStrategy" [cdkConnectedOverlayOrigin]="origin" [cdkConnectedOverlayOpen]="panelOpen" [cdkConnectedOverlayPositions]="_positions" [cdkConnectedOverlayMinWidth]="_triggerRect?.width" [cdkConnectedOverlayOffsetY]="_offsetY" (backdropClick)="close()" (attach)="_onAttached()" (detach)="close()"><div class="mat-select-panel-wrap" [@transformPanelWrap]><div #panel class="mat-select-panel {{ _getPanelTheme() }}" [ngClass]="panelClass" [@transformPanel]="multiple ? \'showing-multiple\' : \'showing\'" (@transformPanel.done)="_panelDoneAnimatingStream.next($event.toState)" [style.transformOrigin]="_transformOrigin" [style.font-size.px]="_triggerFontSize" (keydown)="_handleKeydown($event)"><ng-content></ng-content></div></div></ng-template>',styles:[".mat-select{display:inline-block;width:100%;outline:0}.mat-select-trigger{display:inline-table;cursor:pointer;position:relative;box-sizing:border-box}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-select-value{display:table-cell;max-width:0;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{display:table-cell;vertical-align:middle}.mat-form-field-appearance-fill .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:translateY(-25%)}.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:transform .4s cubic-bezier(.25,.8,.25,1)}._mat-animation-noopable.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:none}.mat-select-arrow{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;margin:0 4px}.mat-select-panel-wrap{flex-basis:100%}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%;border-radius:4px}@media (-ms-high-contrast:active){.mat-select-panel{outline:solid 1px}}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color .4s .133s cubic-bezier(.25,.8,.25,1)}._mat-animation-noopable .mat-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-select-placeholder{color:transparent;-webkit-text-fill-color:transparent;transition:none;display:block}"],inputs:["disabled","disableRipple","tabIndex"],encapsulation:c.ViewEncapsulation.None,changeDetection:c.ChangeDetectionStrategy.OnPush,host:{role:"listbox","[attr.id]":"id","[attr.tabindex]":"tabIndex","[attr.aria-label]":"_getAriaLabel()","[attr.aria-labelledby]":"_getAriaLabelledby()","[attr.aria-required]":"required.toString()","[attr.aria-disabled]":"disabled.toString()","[attr.aria-invalid]":"errorState","[attr.aria-owns]":"panelOpen ? _optionIds : null","[attr.aria-multiselectable]":"multiple","[attr.aria-describedby]":"_ariaDescribedby || null","[attr.aria-activedescendant]":"_getAriaActiveDescendant()","[class.mat-select-disabled]":"disabled","[class.mat-select-invalid]":"errorState","[class.mat-select-required]":"required","[class.mat-select-empty]":"empty",class:"mat-select","(keydown)":"_handleKeydown($event)","(focus)":"_onFocus()","(blur)":"_onBlur()"},animations:[C.transformPanelWrap,C.transformPanel],providers:[{provide:h.MatFormFieldControl,useExisting:f},{provide:u.MAT_OPTION_PARENT_COMPONENT,useExisting:f}]}]}],f.ctorParameters=function(){return[{type:l.ViewportRuler},{type:c.ChangeDetectorRef},{type:c.NgZone},{type:u.ErrorStateMatcher},{type:c.ElementRef},{type:n.Directionality,decorators:[{type:c.Optional}]},{type:p.NgForm,decorators:[{type:c.Optional}]},{type:p.FormGroupDirective,decorators:[{type:c.Optional}]},{type:h.MatFormField,decorators:[{type:c.Optional}]},{type:p.NgControl,decorators:[{type:c.Self},{type:c.Optional}]},{type:String,decorators:[{type:c.Attribute,args:["tabindex"]}]},{type:void 0,decorators:[{type:c.Inject,args:[E]}]},{type:i.LiveAnnouncer}]},f.propDecorators={trigger:[{type:c.ViewChild,args:["trigger",{static:!1}]}],panel:[{type:c.ViewChild,args:["panel",{static:!1}]}],overlayDir:[{type:c.ViewChild,args:[s.CdkConnectedOverlay,{static:!1}]}],options:[{type:c.ContentChildren,args:[u.MatOption,{descendants:!0}]}],optionGroups:[{type:c.ContentChildren,args:[u.MatOptgroup]}],panelClass:[{type:c.Input}],customTrigger:[{type:c.ContentChild,args:[A,{static:!1}]}],placeholder:[{type:c.Input}],required:[{type:c.Input}],multiple:[{type:c.Input}],disableOptionCentering:[{type:c.Input}],compareWith:[{type:c.Input}],value:[{type:c.Input}],ariaLabel:[{type:c.Input,args:["aria-label"]}],ariaLabelledby:[{type:c.Input,args:["aria-labelledby"]}],errorStateMatcher:[{type:c.Input}],sortComparator:[{type:c.Input}],id:[{type:c.Input}],openedChange:[{type:c.Output}],_openedStream:[{type:c.Output,args:["opened"]}],_closedStream:[{type:c.Output,args:["closed"]}],selectionChange:[{type:c.Output}],valueChange:[{type:c.Output}]},f}(x),R=function(){function e(){}return e.decorators=[{type:c.NgModule,args:[{imports:[f.CommonModule,s.OverlayModule,u.MatOptionModule,u.MatCommonModule],exports:[h.MatFormFieldModule,D,A,u.MatOptionModule,u.MatCommonModule],declarations:[D,A],providers:[I]}]}],e}();e.MatSelectModule=R,e.MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY=b,e.SELECT_PANEL_MAX_HEIGHT=256,e.SELECT_PANEL_PADDING_X=16,e.SELECT_PANEL_INDENT_PADDING_X=32,e.SELECT_ITEM_HEIGHT_EM=3,e.SELECT_PANEL_VIEWPORT_PADDING=8,e.MAT_SELECT_SCROLL_STRATEGY=E,e.MAT_SELECT_SCROLL_STRATEGY_PROVIDER=I,e.MatSelectChange=S,e.MatSelectTrigger=A,e.MatSelect=D,e.matSelectAnimations=C,e.transformPanel=w,e.fadeInContent=k,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=material-select.umd.min.js.map