UNPKG

@angular/material

Version:
111 lines 35.5 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/cdk/a11y"),require("@angular/cdk/bidi"),require("@angular/cdk"),require("tslib"),require("@angular/cdk/coercion"),require("rxjs"),require("@angular/cdk/platform"),require("@angular/platform-browser"),require("rxjs/operators"),require("@angular/common"),require("@angular/platform-browser/animations"),require("@angular/cdk/keycodes")):"function"==typeof define&&define.amd?define("@angular/material/core",["exports","@angular/core","@angular/cdk/a11y","@angular/cdk/bidi","@angular/cdk","tslib","@angular/cdk/coercion","rxjs","@angular/cdk/platform","@angular/platform-browser","rxjs/operators","@angular/common","@angular/platform-browser/animations","@angular/cdk/keycodes"],e):e(((t=t||self).ng=t.ng||{},t.ng.material=t.ng.material||{},t.ng.material.core={}),t.ng.core,t.ng.cdk.a11y,t.ng.cdk.bidi,t.ng.cdk,t.tslib,t.ng.cdk.coercion,t.rxjs,t.ng.cdk.platform,t.ng.platformBrowser,t.rxjs.operators,t.ng.common,t.ng.platformBrowser.animations,t.ng.cdk.keycodes)}(this,(function(t,e,n,i,r,o,a,s,c,l,p,u,d,h){"use strict"; /** * @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 */var g=new e.Version("9.0.1"),m=function(){function t(){}return t.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",t.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",t.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",t.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)",t}(),f=function(){function t(){}return t.COMPLEX="375ms",t.ENTERING="225ms",t.EXITING="195ms",t}(),_=new e.Version("9.0.1"); /** * @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 y(){return!0}var b=new e.InjectionToken("mat-sanity-checks",{providedIn:"root",factory:y}),v=function(){function t(t,e){this._hasDoneGlobalChecks=!1,this._document="object"==typeof document&&document?document:null,this._window="object"==typeof window&&window?window:null,t._applyBodyHighContrastModeCssClasses(),this._sanityChecks=e,this._hasDoneGlobalChecks||(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._checkCdkVersionMatch(),this._hasDoneGlobalChecks=!0)}return t.prototype._checksAreEnabled=function(){return e.isDevMode()&&!this._isTestEnv()},t.prototype._isTestEnv=function(){var t=this._window;return t&&(t.__karma__||t.jasmine)},t.prototype._checkDoctypeIsDefined=function(){this._checksAreEnabled()&&(!0===this._sanityChecks||this._sanityChecks.doctype)&&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._checkThemeIsPresent=function(){if(this._checksAreEnabled()&&!1!==this._sanityChecks&&this._sanityChecks.theme&&this._document&&this._document.body&&"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.prototype._checkCdkVersionMatch=function(){this._checksAreEnabled()&&(!0===this._sanityChecks||this._sanityChecks.version)&&_.full!==r.VERSION.full&&console.warn("The Angular Material version ("+_.full+") does not match the Angular CDK version ("+r.VERSION.full+").\nPlease ensure the versions of these two packages exactly match.")},t.decorators=[{type:e.NgModule,args:[{imports:[i.BidiModule],exports:[i.BidiModule]}]}],t.ctorParameters=function(){return[{type:n.HighContrastModeDetector},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[b]}]}]},t}(); /** * @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 D(t){return function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=t.apply(this,o.__spread(e))||this;return i._disabled=!1,i}return o.__extends(e,t),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=a.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),e}(t)} /** * @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 */ /** * @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 */ /** * @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 */ var E=new e.InjectionToken("MAT_DATE_LOCALE",{providedIn:"root",factory:x});function x(){return e.inject(e.LOCALE_ID)}var I,w={provide:E,useExisting:e.LOCALE_ID},O=function(){function t(){this._localeChanges=new s.Subject}return Object.defineProperty(t.prototype,"localeChanges",{get:function(){return this._localeChanges},enumerable:!0,configurable:!0}),t.prototype.deserialize=function(t){return null==t||this.isDateInstance(t)&&this.isValid(t)?t:this.invalid()},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){if(t&&e){var n=this.isValid(t),i=this.isValid(e);return n&&i?!this.compareDate(t,e):n==i}return t==e},t.prototype.clampDate=function(t,e,n){return e&&this.compareDate(t,e)<0?e:n&&this.compareDate(t,n)>0?n:t},t}(),C=new e.InjectionToken("mat-date-formats");try{I="undefined"!=typeof Intl}catch(t){I=!1}var k={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"]},M=A(31,(function(t){return String(t+1)})),R={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},T=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;function A(t,e){for(var n=Array(t),i=0;i<t;i++)n[i]=e(i);return n}var S=function(t){function n(e,n){var i=t.call(this)||this;return i.useUtcForDisplay=!0,t.prototype.setLocale.call(i,e),i.useUtcForDisplay=!n.TRIDENT,i._clampDate=n.TRIDENT||n.EDGE,i}return o.__extends(n,t),n.prototype.getYear=function(t){return t.getFullYear()},n.prototype.getMonth=function(t){return t.getMonth()},n.prototype.getDate=function(t){return t.getDate()},n.prototype.getDayOfWeek=function(t){return t.getDay()},n.prototype.getMonthNames=function(t){var e=this;if(I){var n=new Intl.DateTimeFormat(this.locale,{month:t,timeZone:"utc"});return A(12,(function(t){return e._stripDirectionalityCharacters(e._format(n,new Date(2017,t,1)))}))}return k[t]},n.prototype.getDateNames=function(){var t=this;if(I){var e=new Intl.DateTimeFormat(this.locale,{day:"numeric",timeZone:"utc"});return A(31,(function(n){return t._stripDirectionalityCharacters(t._format(e,new Date(2017,0,n+1)))}))}return M},n.prototype.getDayOfWeekNames=function(t){var e=this;if(I){var n=new Intl.DateTimeFormat(this.locale,{weekday:t,timeZone:"utc"});return A(7,(function(t){return e._stripDirectionalityCharacters(e._format(n,new Date(2017,0,t+1)))}))}return R[t]},n.prototype.getYearName=function(t){if(I){var e=new Intl.DateTimeFormat(this.locale,{year:"numeric",timeZone:"utc"});return this._stripDirectionalityCharacters(this._format(e,t))}return String(this.getYear(t))},n.prototype.getFirstDayOfWeek=function(){return 0},n.prototype.getNumDaysInMonth=function(t){return this.getDate(this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+1,0))},n.prototype.clone=function(t){return new Date(t.getTime())},n.prototype.createDate=function(t,e,n){if(e<0||e>11)throw Error('Invalid month index "'+e+'". Month index has to be between 0 and 11.');if(n<1)throw Error('Invalid date "'+n+'". Date has to be greater than 0.');var i=this._createDateWithOverflow(t,e,n);if(i.getMonth()!=e)throw Error('Invalid date "'+n+'" for month with index "'+e+'".');return i},n.prototype.today=function(){return new Date},n.prototype.parse=function(t){return"number"==typeof t?new Date(t):t?new Date(Date.parse(t)):null},n.prototype.format=function(t,e){if(!this.isValid(t))throw Error("NativeDateAdapter: Cannot format invalid date.");if(I){this._clampDate&&(t.getFullYear()<1||t.getFullYear()>9999)&&(t=this.clone(t)).setFullYear(Math.max(1,Math.min(9999,t.getFullYear()))),e=o.__assign(o.__assign({},e),{timeZone:"utc"});var n=new Intl.DateTimeFormat(this.locale,e);return this._stripDirectionalityCharacters(this._format(n,t))}return this._stripDirectionalityCharacters(t.toDateString())},n.prototype.addCalendarYears=function(t,e){return this.addCalendarMonths(t,12*e)},n.prototype.addCalendarMonths=function(t,e){var n=this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+e,this.getDate(t));return this.getMonth(n)!=((this.getMonth(t)+e)%12+12)%12&&(n=this._createDateWithOverflow(this.getYear(n),this.getMonth(n),0)),n},n.prototype.addCalendarDays=function(t,e){return this._createDateWithOverflow(this.getYear(t),this.getMonth(t),this.getDate(t)+e)},n.prototype.toIso8601=function(t){return[t.getUTCFullYear(),this._2digit(t.getUTCMonth()+1),this._2digit(t.getUTCDate())].join("-")},n.prototype.deserialize=function(e){if("string"==typeof e){if(!e)return null;if(T.test(e)){var n=new Date(e);if(this.isValid(n))return n}}return t.prototype.deserialize.call(this,e)},n.prototype.isDateInstance=function(t){return t instanceof Date},n.prototype.isValid=function(t){return!isNaN(t.getTime())},n.prototype.invalid=function(){return new Date(NaN)},n.prototype._createDateWithOverflow=function(t,e,n){var i=new Date(t,e,n);return t>=0&&t<100&&i.setFullYear(this.getYear(i)-1900),i},n.prototype._2digit=function(t){return("00"+t).slice(-2)},n.prototype._stripDirectionalityCharacters=function(t){return t.replace(/[\u200e\u200f]/g,"")},n.prototype._format=function(t,e){var n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.format(n)},n.decorators=[{type:e.Injectable}],n.ctorParameters=function(){return[{type:String,decorators:[{type:e.Optional},{type:e.Inject,args:[E]}]},{type:c.Platform}]},n}(O),N={parse:{dateInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}},P=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[c.PlatformModule],providers:[{provide:O,useClass:S}]}]}],t}(),L=N,j=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[P],providers:[{provide:C,useValue:L}]}]}],t}(),F=function(){function t(){}return t.prototype.isErrorState=function(t,e){return!!(t&&t.invalid&&(t.dirty||e&&e.submitted))},t.decorators=[{type:e.Injectable}],t}(),V=function(){function t(){}return t.prototype.isErrorState=function(t,e){return!!(t&&t.invalid&&(t.touched||e&&e.submitted))},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ɵprov=e.ɵɵdefineInjectable({factory:function e(){return new t},token:t,providedIn:"root"}),t}(),z=new e.InjectionToken("MAT_HAMMER_OPTIONS"),U=["longpress","slide","slidestart","slideend","slideright","slideleft"],Y=function(){},G={on:function(){},off:Y},H=function(t){function n(e,n){var i=t.call(this)||this;return i._hammerOptions=e,i.events=U,i}return o.__extends(n,t),n.prototype.buildHammer=function(t){var e="undefined"!=typeof window?window.Hammer:null;if(!e)return G;var n=new e(t,this._hammerOptions||void 0),i=new e.Pan,r=new e.Swipe,o=new e.Press,a=this._createRecognizer(i,{event:"slide",threshold:0},r),s=this._createRecognizer(o,{event:"longpress",time:500});return i.recognizeWith(r),s.recognizeWith(a),n.add([r,o,i,a,s]),n},n.prototype._createRecognizer=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=new t.constructor(e);return n.push(t),n.forEach((function(t){return r.recognizeWith(t)})),r},n.decorators=[{type:e.Injectable}],n.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[z]}]},{type:v,decorators:[{type:e.Optional}]}]},n}(l.HammerGestureConfig),B=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"[mat-line], [matLine]",host:{class:"mat-line"}}]}],t}(); /** * @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 W(t,e){t.changes.pipe(p.startWith(t)).subscribe((function(t){var n=t.length;q(e,"mat-2-line",!1),q(e,"mat-3-line",!1),q(e,"mat-multi-line",!1),2===n||3===n?q(e,"mat-"+n+"-line",!0):n>3&&q(e,"mat-multi-line",!0)}))}function q(t,e,n){var i=t.nativeElement.classList;n?i.add(e):i.remove(e)}var Z,J=function J(t,e){W(t,e)},K=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[v],exports:[B,v],declarations:[B]}]}],t}();( /** * @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 */ Z=t.RippleState||(t.RippleState={}))[Z.FADING_IN=0]="FADING_IN",Z[Z.VISIBLE=1]="VISIBLE",Z[Z.FADING_OUT=2]="FADING_OUT",Z[Z.HIDDEN=3]="HIDDEN";var X=function(){function e(e,n,i){this._renderer=e,this.element=n,this.config=i,this.state=t.RippleState.HIDDEN}return e.prototype.fadeOut=function(){this._renderer.fadeOutRipple(this)},e}(),$={enterDuration:450,exitDuration:400},Q=800,tt=c.normalizePassiveListenerOptions({passive:!0}),et=function(){function e(e,i,r,o){var s=this;this._target=e,this._ngZone=i,this._isPointerDown=!1,this._triggerEvents=new Map,this._activeRipples=new Set,this._onMousedown=function(t){var e=n.isFakeMousedownFromScreenReader(t),i=s._lastTouchStartEvent&&Date.now()<s._lastTouchStartEvent+Q;s._target.rippleDisabled||e||i||(s._isPointerDown=!0,s.fadeInRipple(t.clientX,t.clientY,s._target.rippleConfig))},this._onTouchStart=function(t){if(!s._target.rippleDisabled){s._lastTouchStartEvent=Date.now(),s._isPointerDown=!0;for(var e=t.changedTouches,n=0;n<e.length;n++)s.fadeInRipple(e[n].clientX,e[n].clientY,s._target.rippleConfig)}},this._onPointerUp=function(){s._isPointerDown&&(s._isPointerDown=!1,s._activeRipples.forEach((function(e){!e.config.persistent&&(e.state===t.RippleState.VISIBLE||e.config.terminateOnPointerUp&&e.state===t.RippleState.FADING_IN)&&e.fadeOut()})))},o.isBrowser&&(this._containerElement=a.coerceElement(r),this._triggerEvents.set("mousedown",this._onMousedown).set("mouseup",this._onPointerUp).set("mouseleave",this._onPointerUp).set("touchstart",this._onTouchStart).set("touchend",this._onPointerUp).set("touchcancel",this._onPointerUp))}return e.prototype.fadeInRipple=function(e,n,i){var r=this;void 0===i&&(i={});var a=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s=o.__assign(o.__assign({},$),i.animation);i.centered&&(e=a.left+a.width/2,n=a.top+a.height/2);var c=i.radius||function l(t,e,n){var i=Math.max(Math.abs(t-n.left),Math.abs(t-n.right)),r=Math.max(Math.abs(e-n.top),Math.abs(e-n.bottom));return Math.sqrt(i*i+r*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 */(e,n,a),p=e-a.left,u=n-a.top,d=s.enterDuration,h=document.createElement("div");h.classList.add("mat-ripple-element"),h.style.left=p-c+"px",h.style.top=u-c+"px",h.style.height=2*c+"px",h.style.width=2*c+"px",null!=i.color&&(h.style.backgroundColor=i.color),h.style.transitionDuration=d+"ms",this._containerElement.appendChild(h),function g(t){window.getComputedStyle(t).getPropertyValue("opacity")}(h),h.style.transform="scale(1)";var m=new X(this,h,i);return m.state=t.RippleState.FADING_IN,this._activeRipples.add(m),i.persistent||(this._mostRecentTransientRipple=m),this._runTimeoutOutsideZone((function(){var e=m===r._mostRecentTransientRipple;m.state=t.RippleState.VISIBLE,i.persistent||e&&r._isPointerDown||m.fadeOut()}),d),m},e.prototype.fadeOutRipple=function(e){var n=this._activeRipples.delete(e);if(e===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),this._activeRipples.size||(this._containerRect=null),n){var i=e.element,r=o.__assign(o.__assign({},$),e.config.animation);i.style.transitionDuration=r.exitDuration+"ms",i.style.opacity="0",e.state=t.RippleState.FADING_OUT,this._runTimeoutOutsideZone((function(){e.state=t.RippleState.HIDDEN,i.parentNode.removeChild(i)}),r.exitDuration)}},e.prototype.fadeOutAll=function(){this._activeRipples.forEach((function(t){return t.fadeOut()}))},e.prototype.setupTriggerEvents=function(t){var e=this,n=a.coerceElement(t);n&&n!==this._triggerElement&&(this._removeTriggerEvents(),this._ngZone.runOutsideAngular((function(){e._triggerEvents.forEach((function(t,e){n.addEventListener(e,t,tt)}))})),this._triggerElement=n)},e.prototype._runTimeoutOutsideZone=function(t,e){void 0===e&&(e=0),this._ngZone.runOutsideAngular((function(){return setTimeout(t,e)}))},e.prototype._removeTriggerEvents=function(){var t=this;this._triggerElement&&this._triggerEvents.forEach((function(e,n){t._triggerElement.removeEventListener(n,e,tt)}))},e}(),nt=new e.InjectionToken("mat-ripple-global-options"),it=function(){function t(t,e,n,i,r){this._elementRef=t,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=i||{},this._rippleRenderer=new et(this,e,t,n),"NoopAnimations"===r&&(this._globalOptions.animation={enterDuration:0,exitDuration:0})}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=t,this._setupTriggerEventsIfEnabled()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"trigger",{get:function(){return this._trigger||this._elementRef.nativeElement},set:function(t){this._trigger=t,this._setupTriggerEventsIfEnabled()},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()},t.prototype.ngOnDestroy=function(){this._rippleRenderer._removeTriggerEvents()},t.prototype.fadeOutAll=function(){this._rippleRenderer.fadeOutAll()},Object.defineProperty(t.prototype,"rippleConfig",{get:function(){return{centered:this.centered,radius:this.radius,color:this.color,animation:o.__assign(o.__assign({},this._globalOptions.animation),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rippleDisabled",{get:function(){return this.disabled||!!this._globalOptions.disabled},enumerable:!0,configurable:!0}),t.prototype._setupTriggerEventsIfEnabled=function(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)},t.prototype.launch=function(t,e,n){return void 0===e&&(e=0),"number"==typeof t?this._rippleRenderer.fadeInRipple(t,e,o.__assign(o.__assign({},this.rippleConfig),n)):this._rippleRenderer.fadeInRipple(0,0,o.__assign(o.__assign({},this.rippleConfig),t))},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:c.Platform},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[nt]}]},{type:String,decorators:[{type:e.Optional},{type:e.Inject,args:[d.ANIMATION_MODULE_TYPE]}]}]},t.propDecorators={color:[{type:e.Input,args:["matRippleColor"]}],unbounded:[{type:e.Input,args:["matRippleUnbounded"]}],centered:[{type:e.Input,args:["matRippleCentered"]}],radius:[{type:e.Input,args:["matRippleRadius"]}],animation:[{type:e.Input,args:["matRippleAnimation"]}],disabled:[{type:e.Input,args:["matRippleDisabled"]}],trigger:[{type:e.Input,args:["matRippleTrigger"]}]},t}(),rt=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[v,c.PlatformModule],exports:[it,v],declarations:[it]}]}],t}(),ot=function(){function t(t){this._animationMode=t,this.state="unchecked",this.disabled=!1}return t.decorators=[{type:e.Component,args:[{encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,selector:"mat-pseudo-checkbox",template:"",host:{class:"mat-pseudo-checkbox","[class.mat-pseudo-checkbox-indeterminate]":'state === "indeterminate"',"[class.mat-pseudo-checkbox-checked]":'state === "checked"',"[class.mat-pseudo-checkbox-disabled]":"disabled","[class._mat-animation-noopable]":'_animationMode === "NoopAnimations"'},styles:['.mat-pseudo-checkbox{width:16px;height:16px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border-color:transparent}._mat-animation-noopable.mat-pseudo-checkbox{transition:none;animation:none}._mat-animation-noopable.mat-pseudo-checkbox::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:5px;left:1px;width:10px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{top:2.4px;left:1px;width:8px;height:3px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}\n']}]}],t.ctorParameters=function(){return[{type:String,decorators:[{type:e.Optional},{type:e.Inject,args:[d.ANIMATION_MODULE_TYPE]}]}]},t.propDecorators={state:[{type:e.Input}],disabled:[{type:e.Input}]},t}(),at=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{exports:[ot],declarations:[ot]}]}],t}(),st=D((function ct(){})),lt=0,pt=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._labelId="mat-optgroup-label-"+lt++,e}return o.__extends(n,t),n.decorators=[{type:e.Component,args:[{selector:"mat-optgroup",exportAs:"matOptgroup",template:'<label class="mat-optgroup-label" [id]="_labelId">{{ label }} <ng-content></ng-content></label>\n<ng-content select="mat-option, ng-container"></ng-content>\n',encapsulation:e.ViewEncapsulation.None,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"},styles:[".mat-optgroup-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup-label[disabled]{cursor:default}[dir=rtl] .mat-optgroup-label{text-align:right}.mat-optgroup-label .mat-icon{margin-right:16px;vertical-align:middle}.mat-optgroup-label .mat-icon svg{vertical-align:top}[dir=rtl] .mat-optgroup-label .mat-icon{margin-left:16px;margin-right:0}\n"]}]}],n.propDecorators={label:[{type:e.Input}]},n}(st),ut=0,dt=function dt(t,e){void 0===e&&(e=!1),this.source=t,this.isUserInput=e},ht=new e.InjectionToken("MAT_OPTION_PARENT_COMPONENT"),gt=function(){function t(t,n,i,r){this._element=t,this._changeDetectorRef=n,this._parent=i,this.group=r,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+ut++,this.onSelectionChange=new e.EventEmitter,this._stateChanges=new s.Subject}return Object.defineProperty(t.prototype,"multiple",{get:function(){return this._parent&&this._parent.multiple},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=a.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disableRipple",{get:function(){return this._parent&&this._parent.disableRipple},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||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())},t.prototype.deselect=function(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())},t.prototype.focus=function(t,e){var n=this._getHostElement();"function"==typeof n.focus&&n.focus(e)},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!==h.ENTER&&t.keyCode!==h.SPACE||h.hasModifierKey(t)||(this._selectViaInteraction(),t.preventDefault())},t.prototype._selectViaInteraction=function(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))},t.prototype._getAriaSelected=function(){return this.selected||!this.multiple&&null},t.prototype._getTabIndex=function(){return this.disabled?"-1":"0"},t.prototype._getHostElement=function(){return this._element.nativeElement},t.prototype.ngAfterViewChecked=function(){if(this._selected){var t=this.viewValue;t!==this._mostRecentViewValue&&(this._mostRecentViewValue=t,this._stateChanges.next())}},t.prototype.ngOnDestroy=function(){this._stateChanges.complete()},t.prototype._emitSelectionChangeEvent=function(t){void 0===t&&(t=!1),this.onSelectionChange.emit(new dt(this,t))},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]":"_getAriaSelected()","[attr.aria-disabled]":"disabled.toString()","[class.mat-option-disabled]":"disabled","(click)":"_selectViaInteraction()","(keydown)":"_handleKeydown($event)",class:"mat-option"},template:'<mat-pseudo-checkbox *ngIf="multiple" class="mat-option-pseudo-checkbox"\n [state]="selected ? \'checked\' : \'unchecked\'" [disabled]="disabled"></mat-pseudo-checkbox>\n\n<span class="mat-option-text"><ng-content></ng-content></span>\n\n<div class="mat-option-ripple" mat-ripple\n [matRippleTrigger]="_getHostElement()"\n [matRippleDisabled]="disabled || disableRipple">\n</div>\n',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative;cursor:pointer;outline:none;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center;-webkit-tap-highlight-color:transparent}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}.cdk-high-contrast-active .mat-option{margin:0 1px}.cdk-high-contrast-active .mat-option.mat-active{border:solid 1px currentColor;margin:0}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option .mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.cdk-high-contrast-active .mat-option .mat-option-ripple{opacity:.5}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}\n"]}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[ht]}]},{type:pt,decorators:[{type:e.Optional}]}]},t.propDecorators={value:[{type:e.Input}],id:[{type:e.Input}],disabled:[{type:e.Input}],onSelectionChange:[{type:e.Output}]},t}(),mt=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[rt,u.CommonModule,at],exports:[gt,pt],declarations:[gt,pt]}]}],t}(),ft=new e.InjectionToken("mat-label-global-options"); /** * @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 */ t.APR=3,t.AUG=7,t.AnimationCurves=m,t.AnimationDurations=f,t.DEC=11,t.DateAdapter=O,t.ErrorStateMatcher=V,t.FEB=1,t.GestureConfig=H,t.JAN=0,t.JUL=6,t.JUN=5,t.MAR=2,t.MATERIAL_SANITY_CHECKS=b,t.MAT_DATE_FORMATS=C,t.MAT_DATE_LOCALE=E,t.MAT_DATE_LOCALE_FACTORY=x,t.MAT_DATE_LOCALE_PROVIDER=w,t.MAT_HAMMER_OPTIONS=z,t.MAT_LABEL_GLOBAL_OPTIONS=ft,t.MAT_NATIVE_DATE_FORMATS=N,t.MAT_OPTION_PARENT_COMPONENT=ht,t.MAT_RIPPLE_GLOBAL_OPTIONS=nt,t.MAY=4,t.MatCommonModule=v,t.MatLine=B,t.MatLineModule=K,t.MatLineSetter=J,t.MatNativeDateModule=j,t.MatOptgroup=pt,t.MatOption=gt,t.MatOptionModule=mt,t.MatOptionSelectionChange=dt,t.MatPseudoCheckbox=ot,t.MatPseudoCheckboxModule=at,t.MatRipple=it,t.MatRippleModule=rt,t.NOV=10,t.NativeDateAdapter=S,t.NativeDateModule=P,t.OCT=9,t.RippleRef=X,t.RippleRenderer=et,t.SEP=8,t.ShowOnDirtyErrorStateMatcher=F,t.VERSION=g,t._countGroupLabelsBeforeOption=function _t(t,e,n){if(n.length){for(var i=e.toArray(),r=n.toArray(),o=0,a=0;a<t+1;a++)i[a].group&&i[a].group===r[o]&&o++;return o}return 0},t._getOptionScrollPosition=function yt(t,e,n,i){var r=t*e;return r<n?r:r+e>n+i?Math.max(0,r-i+e):n} /** * @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 */,t.defaultRippleAnimationConfig=$,t.mixinColor=function bt(t,e){return function(t){function n(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var r=t.apply(this,o.__spread(n))||this;return r.color=e,r}return o.__extends(n,t),Object.defineProperty(n.prototype,"color",{get:function(){return this._color},set:function(t){var n=t||e;n!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove("mat-"+this._color),n&&this._elementRef.nativeElement.classList.add("mat-"+n),this._color=n)},enumerable:!0,configurable:!0}),n}(t)} /** * @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 */,t.mixinDisableRipple=function vt(t){return function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=t.apply(this,o.__spread(e))||this;return i._disableRipple=!1,i}return o.__extends(e,t),Object.defineProperty(e.prototype,"disableRipple",{get:function(){return this._disableRipple},set:function(t){this._disableRipple=a.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),e}(t)} /** * @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 */,t.mixinDisabled=D,t.mixinErrorState= /** * @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 Dt(t){return function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=t.apply(this,o.__spread(e))||this;return i.errorState=!1,i.stateChanges=new s.Subject,i}return o.__extends(e,t),e.prototype.updateErrorState=function(){var t=this.errorState,e=(this.errorStateMatcher||this._defaultErrorStateMatcher).isErrorState(this.ngControl?this.ngControl.control:null,this._parentFormGroup||this._parentForm);e!==t&&(this.errorState=e,this.stateChanges.next())},e}(t)} /** * @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 */,t.mixinInitialized=function Et(t){return function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=t.apply(this,o.__spread(e))||this;return i._isInitialized=!1,i._pendingSubscribers=[],i.initialized=new s.Observable((function(t){i._isInitialized?i._notifySubscriber(t):i._pendingSubscribers.push(t)})),i}return o.__extends(e,t),e.prototype._markInitialized=function(){if(this._isInitialized)throw Error("This directive has already been marked as initialized and should not be called twice.");this._isInitialized=!0,this._pendingSubscribers.forEach(this._notifySubscriber),this._pendingSubscribers=null},e.prototype._notifySubscriber=function(t){t.next(),t.complete()},e}(t)},t.mixinTabIndex=function xt(t,e){return void 0===e&&(e=0),function(t){function n(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var r=t.apply(this,o.__spread(n))||this;return r._tabIndex=e,r}return o.__extends(n,t),Object.defineProperty(n.prototype,"tabIndex",{get:function(){return this.disabled?-1:this._tabIndex},set:function(t){this._tabIndex=null!=t?t:e},enumerable:!0,configurable:!0}),n}(t)},t.setLines=W,t.ɵ0=L,t.ɵ1=Y,t.ɵangular_material_src_material_core_core_a=y,Object.defineProperty(t,"__esModule",{value:!0})}));