{"version":3,"file":"progress-bar.js","sources":["../../packages/material/progress-bar/progress-bar.js","../../packages/material/progress-bar/progress-bar-module.js","../../packages/material/progress-bar/index.js"],"sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { Component, ChangeDetectionStrategy, Input, ViewEncapsulation } from '@angular/core';\n/**\n * component.\n */\nexport class MatProgressBar {\n constructor() {\n /**\n * Color of the progress bar.\n */\n this.color = 'primary';\n this._value = 0;\n this._bufferValue = 0;\n /**\n * Mode of the progress bar.\n *\n * Input must be one of these values: determinate, indeterminate, buffer, query, defaults to\n * 'determinate'.\n * Mirrored to mode attribute.\n */\n this.mode = 'determinate';\n }\n /**\n * Value of the progressbar. Defaults to zero. Mirrored to aria-valuenow.\n * @return {?}\n */\n get value() { return this._value; }\n /**\n * @param {?} v\n * @return {?}\n */\n set value(v) { this._value = clamp(v || 0); }\n /**\n * Buffer value of the progress bar. Defaults to zero.\n * @return {?}\n */\n get bufferValue() { return this._bufferValue; }\n /**\n * @param {?} v\n * @return {?}\n */\n set bufferValue(v) { this._bufferValue = clamp(v || 0); }\n /**\n * Gets the current transform value for the progress bar's primary indicator.\n * @return {?}\n */\n _primaryTransform() {\n let /** @type {?} */ scale = this.value / 100;\n return { transform: `scaleX(${scale})` };\n }\n /**\n * Gets the current transform value for the progress bar's buffer indicator. Only used if the\n * progress mode is set to buffer, otherwise returns an undefined, causing no transformation.\n * @return {?}\n */\n _bufferTransform() {\n if (this.mode == 'buffer') {\n let /** @type {?} */ scale = this.bufferValue / 100;\n return { transform: `scaleX(${scale})` };\n }\n }\n}\nMatProgressBar.decorators = [\n { type: Component, args: [{selector: 'mat-progress-bar',\n exportAs: 'matProgressBar',\n host: {\n 'role': 'progressbar',\n 'aria-valuemin': '0',\n 'aria-valuemax': '100',\n '[attr.aria-valuenow]': 'value',\n '[attr.mode]': 'mode',\n '[class.mat-primary]': 'color == \"primary\"',\n '[class.mat-accent]': 'color == \"accent\"',\n '[class.mat-warn]': 'color == \"warn\"',\n 'class': 'mat-progress-bar',\n },\n template: \"
\",\n 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)}}\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n preserveWhitespaces: false,\n },] },\n];\n/**\n * @nocollapse\n */\nMatProgressBar.ctorParameters = () => [];\nMatProgressBar.propDecorators = {\n 'color': [{ type: Input },],\n 'value': [{ type: Input },],\n 'bufferValue': [{ type: Input },],\n 'mode': [{ type: Input },],\n};\nfunction MatProgressBar_tsickle_Closure_declarations() {\n /** @type {?} */\n MatProgressBar.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n MatProgressBar.ctorParameters;\n /** @type {?} */\n MatProgressBar.propDecorators;\n /**\n * Color of the progress bar.\n * @type {?}\n */\n MatProgressBar.prototype.color;\n /** @type {?} */\n MatProgressBar.prototype._value;\n /** @type {?} */\n MatProgressBar.prototype._bufferValue;\n /**\n * Mode of the progress bar.\n *\n * Input must be one of these values: determinate, indeterminate, buffer, query, defaults to\n * 'determinate'.\n * Mirrored to mode attribute.\n * @type {?}\n */\n MatProgressBar.prototype.mode;\n}\n/**\n * Clamps a value to be between two numbers, by default 0 and 100.\n * @param {?} v\n * @param {?=} min\n * @param {?=} max\n * @return {?}\n */\nfunction clamp(v, min = 0, max = 100) {\n return Math.max(min, Math.min(max, v));\n}\n//# sourceMappingURL=progress-bar.js.map","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatProgressBar } from './progress-bar';\nexport class MatProgressBarModule {\n}\nMatProgressBarModule.decorators = [\n { type: NgModule, args: [{\n imports: [CommonModule, MatCommonModule],\n exports: [MatProgressBar, MatCommonModule],\n declarations: [MatProgressBar],\n },] },\n];\n/**\n * @nocollapse\n */\nMatProgressBarModule.ctorParameters = () => [];\nfunction MatProgressBarModule_tsickle_Closure_declarations() {\n /** @type {?} */\n MatProgressBarModule.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n MatProgressBarModule.ctorParameters;\n}\n//# sourceMappingURL=progress-bar-module.js.map","/**\n * Generated bundle index. Do not edit.\n */\nexport { MatProgressBarModule, MatProgressBar } from './public-api';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;;;;;;;AAQA;;;AAGA,AAAO,MAAM,cAAc,CAAC;IACxB,WAA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