@angular/cdk
Version:
Angular Material Component Development Kit
37 lines • 5.4 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/cdk/platform"),require("rxjs"),require("rxjs/operators"),require("@angular/cdk/coercion")):"function"==typeof define&&define.amd?define("@angular/cdk/layout",["exports","@angular/core","@angular/cdk/platform","rxjs","rxjs/operators","@angular/cdk/coercion"],e):e(((t=t||self).ng=t.ng||{},t.ng.cdk=t.ng.cdk||{},t.ng.cdk.layout={}),t.ng.core,t.ng.cdk.platform,t.rxjs,t.rxjs.operators,t.ng.cdk.coercion)}(this,(function(t,e,n,r,a,i){"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 o,c=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{}]}],t}(),d=new Set,s=function(){function t(t){this._platform=t,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):u}return t.prototype.matchMedia=function(t){return this._platform.WEBKIT&&function e(t){if(!d.has(t))try{o||((o=document.createElement("style")).setAttribute("type","text/css"),document.head.appendChild(o)),o.sheet&&(o.sheet.insertRule("@media "+t+" {.fx-query-test{ }}",0),d.add(t))}catch(t){console.error(t)}}(t),this._matchMedia(t)},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:n.Platform}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function r(){return new t(e.ɵɵinject(n.Platform))},token:t,providedIn:"root"}),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 u(t){return{matches:"all"===t||""===t,media:t,addListener:function(){},removeListener:function(){}}}
/**
* @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 p=function(){function t(t,e){this._mediaMatcher=t,this._zone=e,this._queries=new Map,this._destroySubject=new r.Subject}return t.prototype.ngOnDestroy=function(){this._destroySubject.next(),this._destroySubject.complete()},t.prototype.isMatched=function(t){var e=this;return m(i.coerceArray(t)).some((function(t){return e._registerQuery(t).mql.matches}))},t.prototype.observe=function(t){var e=this,n=m(i.coerceArray(t)).map((function(t){return e._registerQuery(t).observable})),o=r.combineLatest(n);return(o=r.concat(o.pipe(a.take(1)),o.pipe(a.skip(1),a.debounceTime(0)))).pipe(a.map((function(t){var e={matches:!1,breakpoints:{}};return t.forEach((function(t){e.matches=e.matches||t.matches,e.breakpoints[t.query]=t.matches})),e})))},t.prototype._registerQuery=function(t){var e=this;if(this._queries.has(t))return this._queries.get(t);var n=this._mediaMatcher.matchMedia(t),i={observable:new r.Observable((function(t){var r=function(n){return e._zone.run((function(){return t.next(n)}))};return n.addListener(r),function(){n.removeListener(r)}})).pipe(a.startWith(n),a.map((function(e){return{query:t,matches:e.matches}})),a.takeUntil(this._destroySubject)),mql:n};return this._queries.set(t,i),i},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:s},{type:e.NgZone}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function n(){return new t(e.ɵɵinject(s),e.ɵɵinject(e.NgZone))},token:t,providedIn:"root"}),t}();function m(t){return t.map((function(t){return t.split(",")})).reduce((function(t,e){return t.concat(e)})).map((function(t){return t.trim()}))}
/**
* @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
*/
t.BreakpointObserver=p,t.Breakpoints={XSmall:"(max-width: 599.99px)",Small:"(min-width: 600px) and (max-width: 959.99px)",Medium:"(min-width: 960px) and (max-width: 1279.99px)",Large:"(min-width: 1280px) and (max-width: 1919.99px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.99px) and (orientation: portrait), (max-width: 959.99px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.99px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.99px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.99px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.99px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.99px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.99px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"},t.LayoutModule=c,t.MediaMatcher=s,Object.defineProperty(t,"__esModule",{value:!0})}));