UNPKG

@angular/material

Version:
9 lines 29.1 kB
/** * @license * Copyright Google Inc. 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/core"),require("@angular/common"),require("@angular/cdk/bidi"),require("@angular/cdk/coercion"),require("rxjs/Subject"),require("@angular/platform-browser"),require("@angular/cdk/platform"),require("@angular/cdk/keycodes")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/common","@angular/cdk/bidi","@angular/cdk/coercion","rxjs/Subject","@angular/platform-browser","@angular/cdk/platform","@angular/cdk/keycodes"],e):e((t.ng=t.ng||{},t.ng.material=t.ng.material||{},t.ng.material["progress-bar"]=t.ng.material["progress-bar"]||{}),t.ng.core,t.ng.common,t.ng.cdk.bidi,t.ng.cdk.coercion,t.Rx,t.ng.platformBrowser,t.ng.cdk.platform,t.ng.cdk.keycodes)}(this,function(t,e,r,n,o,a,i,s,p){"use strict";function c(t,e){function r(){this.constructor=t}g(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function l(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(null==t)throw TypeError("Cannot convert undefined or null to object");for(var n=0,o=e;n<o.length;n++){var a=o[n];if(null!=a)for(var i in a)a.hasOwnProperty(i)&&(t[i]=a[i])}return t}function u(t,e){for(var r=Array(t),n=0;n<t;n++)r[n]=e(n);return r}function m(t){window.getComputedStyle(t).getPropertyValue("opacity")}function d(t,e,r){var n=Math.max(Math.abs(t-r.left),Math.abs(t-r.right)),o=Math.max(Math.abs(e-r.top),Math.abs(e-r.bottom));return Math.sqrt(n*n+o*o)}function f(t,e,r){return void 0===e&&(e=0),void 0===r&&(r=100),Math.max(e,Math.min(r,t))}var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},h=(new e.InjectionToken("md-compatibility-mode"),function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"\n [mat-button],\n [mat-fab],\n [mat-icon-button],\n [mat-mini-fab],\n [mat-raised-button],\n [matCardSubtitle],\n [matCardTitle],\n [matCellDef],\n [matColumnDef],\n [matDialogActions],\n [matDialogClose],\n [matDialogContent],\n [matDialogTitle],\n [matHeaderCellDef],\n [matHeaderRowDef],\n [matLine],\n [matRowDef],\n [matStepLabel],\n [matStepperNext],\n [matStepperPrevious],\n [matTabLabel],\n [matTabLink],\n [matTabNav],\n [matTooltip],\n [matInput],\n [matPrefix],\n [matSuffix],\n mat-autocomplete,\n mat-button-toggle,\n mat-button-toggle,\n mat-button-toggle-group,\n mat-card,\n mat-card-actions,\n mat-card-content,\n mat-card-footer,\n mat-card-header,\n mat-card-subtitle,\n mat-card-title,\n mat-card-title-group,\n mat-cell,\n mat-checkbox,\n mat-chip,\n mat-dialog-actions,\n mat-dialog-container,\n mat-dialog-content,\n mat-divider,\n mat-error,\n mat-grid-list,\n mat-grid-tile,\n mat-grid-tile-footer,\n mat-grid-tile-header,\n mat-header-cell,\n mat-header-row,\n mat-hint,\n mat-horizontal-stepper,\n mat-icon,\n mat-input-container,\n mat-form-field,\n mat-list,\n mat-list-item,\n mat-menu,\n mat-nav-list,\n mat-option,\n mat-placeholder,\n mat-progress-bar,\n mat-pseudo-checkbox,\n mat-radio-button,\n mat-radio-group,\n mat-row,\n mat-select,\n mat-sidenav,\n mat-sidenav-container,\n mat-slider,\n mat-spinner,\n mat-step,\n mat-tab,\n mat-table,\n mat-tab-group,\n mat-toolbar,\n mat-vertical-stepper"}]}],t.ctorParameters=function(){return[]},t}()),b=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"\n [md-button],\n [md-fab],\n [md-icon-button],\n [md-mini-fab],\n [md-raised-button],\n [mdCardSubtitle],\n [mdCardTitle],\n [mdCellDef],\n [mdColumnDef],\n [mdDialogActions],\n [mdDialogClose],\n [mdDialogContent],\n [mdDialogTitle],\n [mdHeaderCellDef],\n [mdHeaderRowDef],\n [mdLine],\n [mdRowDef],\n [mdStepLabel],\n [mdStepperNext],\n [mdStepperPrevious],\n [mdTabLabel],\n [mdTabLink],\n [mdTabNav],\n [mdTooltip],\n [mdInput],\n [mdPrefix],\n [mdSuffix],\n md-autocomplete,\n md-button-toggle,\n md-button-toggle,\n md-button-toggle-group,\n md-card,\n md-card-actions,\n md-card-content,\n md-card-footer,\n md-card-header,\n md-card-subtitle,\n md-card-title,\n md-card-title-group,\n md-cell,\n md-checkbox,\n md-chip,\n md-dialog-actions,\n md-dialog-container,\n md-dialog-content,\n md-divider,\n md-error,\n md-grid-list,\n md-grid-tile,\n md-grid-tile-footer,\n md-grid-tile-header,\n md-header-cell,\n md-header-row,\n md-hint,\n md-horizontal-stepper,\n md-icon,\n md-input-container,\n md-form-field,\n md-list,\n md-list-item,\n md-menu,\n md-nav-list,\n md-option,\n md-placeholder,\n md-progress-bar,\n md-pseudo-checkbox,\n md-radio-button,\n md-radio-group,\n md-row,\n md-select,\n md-sidenav,\n md-sidenav-container,\n md-slider,\n md-spinner,\n md-step,\n md-tab,\n md-table,\n md-tab-group,\n md-toolbar,\n md-vertical-stepper"}]}],t.ctorParameters=function(){return[]},t}(),y=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[h,b],exports:[h,b]}]}],t.ctorParameters=function(){return[]},t}(),_=new e.InjectionToken("mat-sanity-checks"),v=function(){function t(t){this._hasDoneGlobalChecks=!1,this._document="object"==typeof document&&document?document:null,t&&!this._hasDoneGlobalChecks&&e.isDevMode()&&(this._checkDoctype(),this._checkTheme(),this._hasDoneGlobalChecks=!0)}return t.prototype._checkDoctype=function(){this._document&&!this._document.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")},t.prototype._checkTheme=function(){if(this._document&&"function"==typeof getComputedStyle){var t=this._document.createElement("div");t.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(t);var e=getComputedStyle(t);e&&"none"!==e.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),this._document.body.removeChild(t)}},t.decorators=[{type:e.NgModule,args:[{imports:[y,n.BidiModule],exports:[y,n.BidiModule],providers:[{provide:_,useValue:!0}]}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[_]}]}]},t}(),D=new e.InjectionToken("MAT_DATE_LOCALE"),w=function(){function t(){this._localeChanges=new a.Subject}return Object.defineProperty(t.prototype,"localeChanges",{get:function(){return this._localeChanges},enumerable:!0,configurable:!0}),t.prototype.getYear=function(t){},t.prototype.getMonth=function(t){},t.prototype.getDate=function(t){},t.prototype.getDayOfWeek=function(t){},t.prototype.getMonthNames=function(t){},t.prototype.getDateNames=function(){},t.prototype.getDayOfWeekNames=function(t){},t.prototype.getYearName=function(t){},t.prototype.getFirstDayOfWeek=function(){},t.prototype.getNumDaysInMonth=function(t){},t.prototype.clone=function(t){},t.prototype.createDate=function(t,e,r){},t.prototype.today=function(){},t.prototype.parse=function(t,e){},t.prototype.format=function(t,e){},t.prototype.addCalendarYears=function(t,e){},t.prototype.addCalendarMonths=function(t,e){},t.prototype.addCalendarDays=function(t,e){},t.prototype.toIso8601=function(t){},t.prototype.fromIso8601=function(t){},t.prototype.isDateInstance=function(t){},t.prototype.isValid=function(t){},t.prototype.setLocale=function(t){this.locale=t,this._localeChanges.next()},t.prototype.compareDate=function(t,e){return this.getYear(t)-this.getYear(e)||this.getMonth(t)-this.getMonth(e)||this.getDate(t)-this.getDate(e)},t.prototype.sameDate=function(t,e){return t&&e?!this.compareDate(t,e):t==e},t.prototype.clampDate=function(t,e,r){return e&&this.compareDate(t,e)<0?e:r&&this.compareDate(t,r)>0?r:t},t}(),C="undefined"!=typeof Intl,I={long:["January","February","March","April","May","June","July","August","September","October","November","December"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],narrow:["J","F","M","A","M","J","J","A","S","O","N","D"]},k=u(31,function(t){return String(t+1)}),O={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},E=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/,T=(function(t){function r(e){var r=t.call(this)||this;return r.useUtcForDisplay=!0,t.prototype.setLocale.call(r,e),r}c(r,t),r.prototype.getYear=function(t){return t.getFullYear()},r.prototype.getMonth=function(t){return t.getMonth()},r.prototype.getDate=function(t){return t.getDate()},r.prototype.getDayOfWeek=function(t){return t.getDay()},r.prototype.getMonthNames=function(t){var e=this;if(C){var r=new Intl.DateTimeFormat(this.locale,{month:t});return u(12,function(t){return e._stripDirectionalityCharacters(r.format(new Date(2017,t,1)))})}return I[t]},r.prototype.getDateNames=function(){var t=this;if(C){var e=new Intl.DateTimeFormat(this.locale,{day:"numeric"});return u(31,function(r){return t._stripDirectionalityCharacters(e.format(new Date(2017,0,r+1)))})}return k},r.prototype.getDayOfWeekNames=function(t){var e=this;if(C){var r=new Intl.DateTimeFormat(this.locale,{weekday:t});return u(7,function(t){return e._stripDirectionalityCharacters(r.format(new Date(2017,0,t+1)))})}return O[t]},r.prototype.getYearName=function(t){if(C){var e=new Intl.DateTimeFormat(this.locale,{year:"numeric"});return this._stripDirectionalityCharacters(e.format(t))}return String(this.getYear(t))},r.prototype.getFirstDayOfWeek=function(){return 0},r.prototype.getNumDaysInMonth=function(t){return this.getDate(this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+1,0))},r.prototype.clone=function(t){return this.createDate(this.getYear(t),this.getMonth(t),this.getDate(t))},r.prototype.createDate=function(t,e,r){if(e<0||e>11)throw Error('Invalid month index "'+e+'". Month index has to be between 0 and 11.');if(r<1)throw Error('Invalid date "'+r+'". Date has to be greater than 0.');var n=this._createDateWithOverflow(t,e,r);if(n.getMonth()!=e)throw Error('Invalid date "'+r+'" for month with index "'+e+'".');return n},r.prototype.today=function(){return new Date},r.prototype.parse=function(t){return"number"==typeof t?new Date(t):t?new Date(Date.parse(t)):null},r.prototype.format=function(t,e){if(!this.isValid(t))throw Error("NativeDateAdapter: Cannot format invalid date.");if(C){this.useUtcForDisplay&&(t=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())),e=l({},e,{timeZone:"utc"}));var r=new Intl.DateTimeFormat(this.locale,e);return this._stripDirectionalityCharacters(r.format(t))}return this._stripDirectionalityCharacters(t.toDateString())},r.prototype.addCalendarYears=function(t,e){return this.addCalendarMonths(t,12*e)},r.prototype.addCalendarMonths=function(t,e){var r=this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+e,this.getDate(t));return this.getMonth(r)!=((this.getMonth(t)+e)%12+12)%12&&(r=this._createDateWithOverflow(this.getYear(r),this.getMonth(r),0)),r},r.prototype.addCalendarDays=function(t,e){return this._createDateWithOverflow(this.getYear(t),this.getMonth(t),this.getDate(t)+e)},r.prototype.toIso8601=function(t){return[t.getUTCFullYear(),this._2digit(t.getUTCMonth()+1),this._2digit(t.getUTCDate())].join("-")},r.prototype.fromIso8601=function(t){if(E.test(t)){var e=new Date(t);if(this.isValid(e))return e}return null},r.prototype.isDateInstance=function(t){return t instanceof Date},r.prototype.isValid=function(t){return!isNaN(t.getTime())},r.prototype._createDateWithOverflow=function(t,e,r){var n=new Date(t,e,r);return t>=0&&t<100&&n.setFullYear(this.getYear(n)-1900),n},r.prototype._2digit=function(t){return("00"+t).slice(-2)},r.prototype._stripDirectionalityCharacters=function(t){return t.replace(/[\u200e\u200f]/g,"")},r.decorators=[{type:e.Injectable}],r.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[D]}]}]}}(w),new e.InjectionToken("mat-date-formats"),function(t){function r(){var r=t.call(this)||this;return r._hammer="undefined"!=typeof window?window.Hammer:null,r.events=r._hammer?["longpress","slide","slidestart","slideend","slideright","slideleft"]:[],!r._hammer&&e.isDevMode()&&console.warn("Could not find HammerJS. Certain Angular Material components may not work correctly."),r}c(r,t),r.prototype.buildHammer=function(t){var e=new this._hammer(t),r=new this._hammer.Pan,n=new this._hammer.Swipe,o=new this._hammer.Press,a=this._createRecognizer(r,{event:"slide",threshold:0},n),i=this._createRecognizer(o,{event:"longpress",time:500});return r.recognizeWith(n),e.add([n,o,r,a,i]),e},r.prototype._createRecognizer=function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=new t.constructor(e);return r.push(t),r.forEach(function(t){return o.recognizeWith(t)}),o},r.decorators=[{type:e.Injectable}],r.ctorParameters=function(){return[]}}(i.HammerGestureConfig),{});T.FADING_IN=0,T.VISIBLE=1,T.FADING_OUT=2,T.HIDDEN=3,T[T.FADING_IN]="FADING_IN",T[T.VISIBLE]="VISIBLE",T[T.FADING_OUT]="FADING_OUT",T[T.HIDDEN]="HIDDEN";var M=function(){function t(t,e,r){this._renderer=t,this.element=e,this.config=r,this.state=T.HIDDEN}return t.prototype.fadeOut=function(){this._renderer.fadeOutRipple(this)},t}(),R=function(){function t(t,e,r){this._ngZone=e,this._isPointerDown=!1,this._triggerEvents=new Map,this._activeRipples=new Set,this.rippleConfig={},this.rippleDisabled=!1,r.isBrowser&&(this._containerElement=t.nativeElement,this._triggerEvents.set("mousedown",this.onMousedown.bind(this)),this._triggerEvents.set("touchstart",this.onTouchstart.bind(this)),this._triggerEvents.set("mouseup",this.onPointerUp.bind(this)),this._triggerEvents.set("touchend",this.onPointerUp.bind(this)),this._triggerEvents.set("mouseleave",this.onPointerLeave.bind(this)),this.setTriggerElement(this._containerElement))}return t.prototype.fadeInRipple=function(t,e,r){var n=this;void 0===r&&(r={});var o=this._containerElement.getBoundingClientRect();r.centered&&(t=o.left+o.width/2,e=o.top+o.height/2);var a=r.radius||d(t,e,o),i=1/(r.speedFactor||1)*450,s=t-o.left,p=e-o.top,c=document.createElement("div");c.classList.add("mat-ripple-element"),c.style.left=s-a+"px",c.style.top=p-a+"px",c.style.height=2*a+"px",c.style.width=2*a+"px",c.style.backgroundColor=r.color||null,c.style.transitionDuration=i+"ms",this._containerElement.appendChild(c),m(c),c.style.transform="scale(1)";var l=new M(this,c,r);return l.state=T.FADING_IN,this._activeRipples.add(l),this.runTimeoutOutsideZone(function(){l.state=T.VISIBLE,r.persistent||n._isPointerDown||l.fadeOut()},i),l},t.prototype.fadeOutRipple=function(t){if(this._activeRipples.delete(t)){var e=t.element;e.style.transitionDuration="400ms",e.style.opacity="0",t.state=T.FADING_OUT,this.runTimeoutOutsideZone(function(){t.state=T.HIDDEN,e.parentNode.removeChild(e)},400)}},t.prototype.fadeOutAll=function(){this._activeRipples.forEach(function(t){return t.fadeOut()})},t.prototype.setTriggerElement=function(t){var e=this;this._triggerElement&&this._triggerEvents.forEach(function(t,r){e._triggerElement.removeEventListener(r,t)}),t&&this._ngZone.runOutsideAngular(function(){e._triggerEvents.forEach(function(e,r){return t.addEventListener(r,e)})}),this._triggerElement=t},t.prototype.onMousedown=function(t){this.rippleDisabled||(this._isPointerDown=!0,this.fadeInRipple(t.clientX,t.clientY,this.rippleConfig))},t.prototype.onPointerUp=function(){this._isPointerDown=!1,this._activeRipples.forEach(function(t){t.config.persistent||t.state!==T.VISIBLE||t.fadeOut()})},t.prototype.onPointerLeave=function(){this._isPointerDown&&this.onPointerUp()},t.prototype.onTouchstart=function(t){if(!this.rippleDisabled){var e=t.touches[0],r=e.clientX,n=e.clientY;this._isPointerDown=!0,this.fadeInRipple(r,n,this.rippleConfig)}},t.prototype.runTimeoutOutsideZone=function(t,e){void 0===e&&(e=0),this._ngZone.runOutsideAngular(function(){return setTimeout(t,e)})},t}(),S=new e.InjectionToken("mat-ripple-global-options"),P=(function(){function t(t,e,r,n){this.radius=0,this.speedFactor=1,this._rippleRenderer=new R(t,e,r),this._globalOptions=n||{},this._updateRippleRenderer()}t.prototype.ngOnChanges=function(t){(t.trigger||t._matRippleTrigger)&&this.trigger&&this._rippleRenderer.setTriggerElement(this.trigger),this._updateRippleRenderer()},t.prototype.ngOnDestroy=function(){this._rippleRenderer.setTriggerElement(null)},t.prototype.launch=function(t,e,r){return void 0===r&&(r=this.rippleConfig),this._rippleRenderer.fadeInRipple(t,e,r)},t.prototype.fadeOutAll=function(){this._rippleRenderer.fadeOutAll()},Object.defineProperty(t.prototype,"rippleConfig",{get:function(){return{centered:this.centered,speedFactor:this.speedFactor*(this._globalOptions.baseSpeedFactor||1),radius:this.radius,color:this.color}},enumerable:!0,configurable:!0}),t.prototype._updateRippleRenderer=function(){this._rippleRenderer.rippleDisabled=this._globalOptions.disabled||this.disabled,this._rippleRenderer.rippleConfig=this.rippleConfig},t.decorators=[{type:e.Directive,args:[{selector:"[mat-ripple], [matRipple]",exportAs:"matRipple",host:{class:"mat-ripple","[class.mat-ripple-unbounded]":"unbounded"}}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone},{type:s.Platform},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[S]}]}]},t.propDecorators={trigger:[{type:e.Input,args:["matRippleTrigger"]}],centered:[{type:e.Input,args:["matRippleCentered"]}],disabled:[{type:e.Input,args:["matRippleDisabled"]}],radius:[{type:e.Input,args:["matRippleRadius"]}],speedFactor:[{type:e.Input,args:["matRippleSpeedFactor"]}],color:[{type:e.Input,args:["matRippleColor"]}],unbounded:[{type:e.Input,args:["matRippleUnbounded"]}]}}(),function(){function t(){}return t}()),x=function(t){return function(t){function e(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,e)||this;return n._disabled=!1,n}return c(e,t),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=o.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),e}(t)}(P),N=0,F=function(t){function r(){var e=null!==t&&t.apply(this,arguments)||this;return e._labelId="mat-optgroup-label-"+N++,e}return c(r,t),r.decorators=[{type:e.Component,args:[{selector:"mat-optgroup",exportAs:"matOptgroup",template:'<label class="mat-optgroup-label" [id]="_labelId">{{ label }}</label><ng-content select="mat-option"></ng-content>',encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush,inputs:["disabled"],host:{class:"mat-optgroup",role:"group","[class.mat-optgroup-disabled]":"disabled","[attr.aria-disabled]":"disabled.toString()","[attr.aria-labelledby]":"_labelId"}}]}],r.ctorParameters=function(){return[]},r.propDecorators={label:[{type:e.Input}]},r}(x),A=0,j=function(){function t(t,e){void 0===e&&(e=!1),this.source=t,this.isUserInput=e}return t}(),L=(function(){function t(t,r,n){this._element=t,this._changeDetectorRef=r,this.group=n,this._selected=!1,this._active=!1,this._multiple=!1,this._disableRipple=!1,this._disabled=!1,this._id="mat-option-"+A++,this.onSelectionChange=new e.EventEmitter}Object.defineProperty(t.prototype,"multiple",{get:function(){return this._multiple},set:function(t){t!==this._multiple&&(this._multiple=t,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.group&&this.group.disabled||this._disabled},set:function(t){this._disabled=o.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disableRipple",{get:function(){return this._disableRipple},set:function(t){this._disableRipple=t,this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"active",{get:function(){return this._active},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"viewValue",{get:function(){return(this._getHostElement().textContent||"").trim()},enumerable:!0,configurable:!0}),t.prototype.select=function(){this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent()},t.prototype.deselect=function(){this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent()},t.prototype.focus=function(){var t=this._getHostElement();"function"==typeof t.focus&&t.focus()},t.prototype.setActiveStyles=function(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())},t.prototype.setInactiveStyles=function(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())},t.prototype.getLabel=function(){return this.viewValue},t.prototype._handleKeydown=function(t){t.keyCode!==p.ENTER&&t.keyCode!==p.SPACE||(this._selectViaInteraction(),t.preventDefault())},t.prototype._selectViaInteraction=function(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))},t.prototype._getTabIndex=function(){return this.disabled?"-1":"0"},t.prototype._getHostElement=function(){return this._element.nativeElement},t.prototype._emitSelectionChangeEvent=function(t){void 0===t&&(t=!1),this.onSelectionChange.emit(new j(this,t))},t.countGroupLabelsBeforeOption=function(t,e,r){if(r.length){for(var n=e.toArray(),o=r.toArray(),a=0,i=0;i<t+1;i++)n[i].group&&n[i].group===o[a]&&a++;return a}return 0},t.decorators=[{type:e.Component,args:[{selector:"mat-option",exportAs:"matOption",host:{role:"option","[attr.tabindex]":"_getTabIndex()","[class.mat-selected]":"selected","[class.mat-option-multiple]":"multiple","[class.mat-active]":"active","[id]":"id","[attr.aria-selected]":"selected.toString()","[attr.aria-disabled]":"disabled.toString()","[class.mat-option-disabled]":"disabled","(click)":"_selectViaInteraction()","(keydown)":"_handleKeydown($event)",class:"mat-option"},template:'<span *ngIf="multiple"><mat-pseudo-checkbox class="mat-option-pseudo-checkbox" [state]="selected ? \'checked\' : \'\'" [disabled]="disabled"></mat-pseudo-checkbox></span><span class="mat-option-text"><ng-content></ng-content></span><div class="mat-option-ripple" mat-ripple [matRippleTrigger]="_getHostElement()" [matRippleDisabled]="disabled || disableRipple"></div>',encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef},{type:F,decorators:[{type:e.Optional}]}]},t.propDecorators={value:[{type:e.Input}],disabled:[{type:e.Input}],onSelectionChange:[{type:e.Output}]}}(),new e.InjectionToken("mat-placeholder-global-options"),function(){function t(){this.color="primary",this._value=0,this._bufferValue=0,this.mode="determinate"}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(t){this._value=f(t||0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bufferValue",{get:function(){return this._bufferValue},set:function(t){this._bufferValue=f(t||0)},enumerable:!0,configurable:!0}),t.prototype._primaryTransform=function(){return{transform:"scaleX("+this.value/100+")"}},t.prototype._bufferTransform=function(){if("buffer"==this.mode){return{transform:"scaleX("+this.bufferValue/100+")"}}},t.decorators=[{type:e.Component,args:[{selector:"mat-progress-bar",exportAs:"matProgressBar",host:{role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","[attr.aria-valuenow]":"value","[attr.mode]":"mode","[class.mat-primary]":'color == "primary"',"[class.mat-accent]":'color == "accent"',"[class.mat-warn]":'color == "warn"',class:"mat-progress-bar"},template:'<div class="mat-progress-bar-background mat-progress-bar-element"></div><div class="mat-progress-bar-buffer mat-progress-bar-element" [ngStyle]="_bufferTransform()"></div><div class="mat-progress-bar-primary mat-progress-bar-fill mat-progress-bar-element" [ngStyle]="_primaryTransform()"></div><div class="mat-progress-bar-secondary mat-progress-bar-fill mat-progress-bar-element"></div>',styles:[".mat-progress-bar{display:block;height:5px;overflow:hidden;position:relative;transform:translateZ(0);transition:opacity 250ms linear;width:100%}.mat-progress-bar .mat-progress-bar-element,.mat-progress-bar .mat-progress-bar-fill::after{height:100%;position:absolute;width:100%}.mat-progress-bar .mat-progress-bar-background{background-repeat:repeat-x;background-size:10px 4px;display:none}.mat-progress-bar .mat-progress-bar-buffer{transform-origin:top left;transition:transform 250ms ease}.mat-progress-bar .mat-progress-bar-secondary{display:none}.mat-progress-bar .mat-progress-bar-fill{animation:none;transform-origin:top left;transition:transform 250ms ease}.mat-progress-bar .mat-progress-bar-fill::after{animation:none;content:'';display:inline-block;left:0}.mat-progress-bar[dir=rtl],[dir=rtl] .mat-progress-bar{transform:rotateY(180deg)}.mat-progress-bar[mode=query]{transform:rotateZ(180deg)}.mat-progress-bar[mode=query][dir=rtl],[dir=rtl] .mat-progress-bar[mode=query]{transform:rotateZ(180deg) rotateY(180deg)}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-fill,.mat-progress-bar[mode=query] .mat-progress-bar-fill{transition:none}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-primary,.mat-progress-bar[mode=query] .mat-progress-bar-primary{animation:mat-progress-bar-primary-indeterminate-translate 2s infinite linear;left:-145.166611%}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-primary.mat-progress-bar-fill::after,.mat-progress-bar[mode=query] .mat-progress-bar-primary.mat-progress-bar-fill::after{animation:mat-progress-bar-primary-indeterminate-scale 2s infinite linear}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-secondary,.mat-progress-bar[mode=query] .mat-progress-bar-secondary{animation:mat-progress-bar-secondary-indeterminate-translate 2s infinite linear;left:-54.888891%;display:block}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-secondary.mat-progress-bar-fill::after,.mat-progress-bar[mode=query] .mat-progress-bar-secondary.mat-progress-bar-fill::after{animation:mat-progress-bar-secondary-indeterminate-scale 2s infinite linear}.mat-progress-bar[mode=buffer] .mat-progress-bar-background{animation:mat-progress-bar-background-scroll 250ms infinite linear;display:block}@keyframes mat-progress-bar-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(.5,0,.70173,.49582);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(.30244,.38135,.55,.95635);transform:translateX(83.67142%)}100%{transform:translateX(200.61106%)}}@keyframes mat-progress-bar-primary-indeterminate-scale{0%{transform:scaleX(.08)}36.65%{animation-timing-function:cubic-bezier(.33473,.12482,.78584,1);transform:scaleX(.08)}69.15%{animation-timing-function:cubic-bezier(.06,.11,.6,1);transform:scaleX(.66148)}100%{transform:scaleX(.08)}}@keyframes mat-progress-bar-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(.15,0,.51506,.40969);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(.31033,.28406,.8,.73371);transform:translateX(37.65191%)}48.35%{animation-timing-function:cubic-bezier(.4,.62704,.6,.90203);transform:translateX(84.38617%)}100%{transform:translateX(160.27778%)}}@keyframes mat-progress-bar-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(.15,0,.51506,.40969);transform:scaleX(.08)}19.15%{animation-timing-function:cubic-bezier(.31033,.28406,.8,.73371);transform:scaleX(.4571)}44.15%{animation-timing-function:cubic-bezier(.4,.62704,.6,.90203);transform:scaleX(.72796)}100%{transform:scaleX(.08)}}@keyframes mat-progress-bar-background-scroll{to{transform:translateX(-10px)}}"],changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1}]}],t.ctorParameters=function(){return[]},t.propDecorators={color:[{type:e.Input}],value:[{type:e.Input}],bufferValue:[{type:e.Input}],mode:[{type:e.Input}]},t}()),V=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[r.CommonModule,v],exports:[L,v],declarations:[L]}]}],t.ctorParameters=function(){return[]},t}();t.MatProgressBarModule=V,t.MatProgressBar=L,Object.defineProperty(t,"__esModule",{value:!0})}); //# sourceMappingURL=/Users/karakara/repos/material2/dist/bundles/material-progress-bar.umd.min.js.map