blob: d64e0adbd7232aced8b2bc788fd6afc0353d556f [file] [log] [blame]
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("@angular/material/core"),require("@angular/cdk/coercion"),require("@angular/platform-browser/animations"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@angular/material/progress-bar",["exports","@angular/core","@angular/common","@angular/material/core","@angular/cdk/coercion","@angular/platform-browser/animations","rxjs","rxjs/operators"],e):e(((r=r||self).ng=r.ng||{},r.ng.material=r.ng.material||{},r.ng.material.progressBar={}),r.ng.core,r.ng.common,r.ng.material.core,r.ng.cdk.coercion,r.ng.platformBrowser.animations,r.rxjs,r.rxjs.operators)}(this,(function(r,e,a,t,n,o,i,s){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var m=function(r,e){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,e){r.__proto__=e}||function(r,e){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a])})(r,e)},p=t.mixinColor((function l(r){this._elementRef=r}),"primary"),c=new e.InjectionToken("mat-progress-bar-location",{providedIn:"root",factory:b});function b(){var r=e.inject(a.DOCUMENT),t=r?r.location:null;return{getPathname:function(){return t?t.pathname+t.search:""}}}var u,g=0,f=function(r){function a(a,t,n,o){var s=r.call(this,a)||this;s._elementRef=a,s._ngZone=t,s._animationMode=n,s._isNoopAnimation=!1,s._value=0,s._bufferValue=0,s.animationEnd=new e.EventEmitter,s._animationEndSubscription=i.Subscription.EMPTY,s.mode="determinate",s.progressbarId="mat-progress-bar-"+g++;var m=o?o.getPathname().split("#")[0]:"";return s._rectangleFillValue="url('"+m+"#"+s.progressbarId+"')",s._isNoopAnimation="NoopAnimations"===n,s}return function t(r,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function a(){this.constructor=r}m(r,e),r.prototype=null===e?Object.create(e):(a.prototype=e.prototype,new a)}(a,r),Object.defineProperty(a.prototype,"value",{get:function(){return this._value},set:function(r){this._value=d(n.coerceNumberProperty(r)||0)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"bufferValue",{get:function(){return this._bufferValue},set:function(r){this._bufferValue=d(r||0)},enumerable:!1,configurable:!0}),a.prototype._primaryTransform=function(){return{transform:"scale3d("+this.value/100+", 1, 1)"}},a.prototype._bufferTransform=function(){return"buffer"===this.mode?{transform:"scale3d("+this.bufferValue/100+", 1, 1)"}:null},a.prototype.ngAfterViewInit=function(){var r=this;this._ngZone.runOutsideAngular((function(){var e=r._primaryValueBar.nativeElement;r._animationEndSubscription=i.fromEvent(e,"transitionend").pipe(s.filter((function(r){return r.target===e}))).subscribe((function(){"determinate"!==r.mode&&"buffer"!==r.mode||r._ngZone.run((function(){return r.animationEnd.next({value:r.value})}))}))}))},a.prototype.ngOnDestroy=function(){this._animationEndSubscription.unsubscribe()},a}(p);function d(r,e,a){return void 0===e&&(e=0),void 0===a&&(a=100),Math.max(e,Math.min(a,r))}
/**
* @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
*/f.decorators=[{type:e.Component,args:[{selector:"mat-progress-bar",exportAs:"matProgressBar",host:{role:"progressbar","aria-valuemin":"0","aria-valuemax":"100",tabindex:"-1","[attr.aria-valuenow]":'(mode === "indeterminate" || mode === "query") ? null : value',"[attr.mode]":"mode",class:"mat-progress-bar","[class._mat-animation-noopable]":"_isNoopAnimation"},inputs:["color"],template:'\x3c!--\n All children need to be hidden for screen readers in order to support ChromeVox.\n More context in the issue: https://github.com/angular/components/issues/22165.\n--\x3e\n<div aria-hidden="true">\n <svg width="100%" height="4" focusable="false" class="mat-progress-bar-background mat-progress-bar-element">\n <defs>\n <pattern [id]="progressbarId" x="4" y="0" width="8" height="4" patternUnits="userSpaceOnUse">\n <circle cx="2" cy="2" r="2"/>\n </pattern>\n </defs>\n <rect [attr.fill]="_rectangleFillValue" width="100%" height="100%"/>\n </svg>\n \x3c!--\n The background div is named as such because it appears below the other divs and is not sized based\n on values.\n --\x3e\n <div class="mat-progress-bar-buffer mat-progress-bar-element" [ngStyle]="_bufferTransform()"></div>\n <div class="mat-progress-bar-primary mat-progress-bar-fill mat-progress-bar-element" [ngStyle]="_primaryTransform()" #primaryValueBar></div>\n <div class="mat-progress-bar-secondary mat-progress-bar-fill mat-progress-bar-element"></div>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:['.mat-progress-bar{display:block;height:4px;overflow:hidden;position:relative;transition:opacity 250ms linear;width:100%}._mat-animation-noopable.mat-progress-bar{transition:none;animation:none}.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{width:calc(100% + 10px)}.cdk-high-contrast-active .mat-progress-bar .mat-progress-bar-background{display:none}.mat-progress-bar .mat-progress-bar-buffer{transform-origin:top left;transition:transform 250ms ease}.cdk-high-contrast-active .mat-progress-bar .mat-progress-bar-buffer{border-top:solid 5px;opacity:.5}.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}.cdk-high-contrast-active .mat-progress-bar .mat-progress-bar-fill{border-top:solid 4px}.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{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-primary-indeterminate-translate 2000ms 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{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-primary-indeterminate-scale 2000ms infinite linear}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-secondary,.mat-progress-bar[mode=query] .mat-progress-bar-secondary{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-secondary-indeterminate-translate 2000ms 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{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-secondary-indeterminate-scale 2000ms infinite linear}.mat-progress-bar[mode=buffer] .mat-progress-bar-background{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-background-scroll 250ms infinite linear;display:block}.mat-progress-bar._mat-animation-noopable .mat-progress-bar-fill,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-fill::after,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-buffer,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-primary,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-primary.mat-progress-bar-fill::after,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-secondary,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-secondary.mat-progress-bar-fill::after,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-background{animation:none;transition-duration:1ms}@keyframes mat-progress-bar-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.67142%)}100%{transform:translateX(200.611057%)}}@keyframes mat-progress-bar-primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes mat-progress-bar-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.651913%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.386165%)}100%{transform:translateX(160.277782%)}}@keyframes mat-progress-bar-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes mat-progress-bar-background-scroll{to{transform:translateX(-8px)}}\n']}]}],f.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone},{type:String,decorators:[{type:e.Optional},{type:e.Inject,args:[o.ANIMATION_MODULE_TYPE]}]},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[c]}]}]},f.propDecorators={value:[{type:e.Input}],bufferValue:[{type:e.Input}],_primaryValueBar:[{type:e.ViewChild,args:["primaryValueBar"]}],animationEnd:[{type:e.Output}],mode:[{type:e.Input}]},(u=function u(){}).decorators=[{type:e.NgModule,args:[{imports:[a.CommonModule,t.MatCommonModule],exports:[f,t.MatCommonModule],declarations:[f]}]}],
/**
* @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
*/
r.MAT_PROGRESS_BAR_LOCATION=c,r.MAT_PROGRESS_BAR_LOCATION_FACTORY=b,r.MatProgressBar=f,r.MatProgressBarModule=u,Object.defineProperty(r,"__esModule",{value:!0})}));