blob: 100dd9c22f159bd5e6bb49a376bf20d954b756dc [file] [log] [blame]
{"version":3,"file":"core.js","sources":["../../../src/lib/core/media-marshaller/media-marshaller.ts","../../../src/lib/core/basis-validator/basis-validator.ts","../../../src/lib/core/style-builder/style-builder.ts","../../../src/lib/core/style-utils/style-utils.ts","../../../src/lib/utils/auto-prefixer.ts","../../../src/lib/core/media-trigger/media-trigger.ts","../../../src/lib/core/media-observer/media-observer.ts","../../../src/lib/core/utils/array.ts","../../../src/lib/core/media-marshaller/print-hook.ts","../../../src/lib/core/match-media/mock/mock-match-media.ts","../../../src/lib/core/match-media/match-media.ts","../../../src/lib/core/breakpoints/break-point-registry.ts","../../../src/lib/core/utils/sort.ts","../../../src/lib/core/breakpoints/break-points-token.ts","../../../src/lib/core/breakpoints/breakpoint-tools.ts","../../../src/lib/utils/object-extend.ts","../../../src/lib/core/breakpoints/data/orientation-break-points.ts","../../../src/lib/core/breakpoints/data/break-points.ts","../../../src/lib/core/base/base2.ts","../../../src/lib/utils/layout-validator.ts","../../../src/lib/core/add-alias.ts","../../../src/lib/core/tokens/breakpoint-token.ts","../../../src/lib/core/tokens/server-token.ts","../../../src/lib/core/tokens/library-config.ts","../../../src/lib/core/stylesheet-map/stylesheet-map.ts","../../../src/lib/core/media-change.ts","../../../src/lib/core/module.ts","../../../src/lib/core/browser-provider.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC 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 {Injectable} from '@angular/core';\n\nimport {merge, Observable, Subject, Subscription} from 'rxjs';\nimport {filter, tap} from 'rxjs/operators';\n\nimport {BreakPoint} from '../breakpoints/break-point';\nimport {sortDescendingPriority} from '../utils/sort';\nimport {BreakPointRegistry} from '../breakpoints/break-point-registry';\nimport {MatchMedia} from '../match-media/match-media';\nimport {MediaChange} from '../media-change';\n\nimport {PrintHook, HookTarget} from './print-hook';\nimport {mergeAlias} from '../add-alias';\n\ntype ClearCallback = () => void;\ntype UpdateCallback = (val: any) => void;\ntype Builder = UpdateCallback | ClearCallback;\n\ntype ValueMap = Map<string, string>;\ntype BreakpointMap = Map<string, ValueMap>;\ntype ElementMap = Map<HTMLElement, BreakpointMap>;\ntype ElementKeyMap = WeakMap<HTMLElement, Set<string>>;\ntype SubscriptionMap = Map<string, Subscription>;\ntype WatcherMap = WeakMap<HTMLElement, SubscriptionMap>;\ntype BuilderMap = WeakMap<HTMLElement, Map<string, Builder>>;\n\nexport interface ElementMatcher {\n element: HTMLElement;\n key: string;\n value: any;\n}\n\n/**\n * MediaMarshaller - register responsive values from directives and\n * trigger them based on media query events\n */\n@Injectable({providedIn: 'root'})\nexport class MediaMarshaller {\n private activatedBreakpoints: BreakPoint[] = [];\n private elementMap: ElementMap = new Map();\n private elementKeyMap: ElementKeyMap = new WeakMap();\n private watcherMap: WatcherMap = new WeakMap(); // special triggers to update elements\n private updateMap: BuilderMap = new WeakMap(); // callback functions to update styles\n private clearMap: BuilderMap = new WeakMap(); // callback functions to clear styles\n\n private subject: Subject<ElementMatcher> = new Subject();\n\n get activatedAlias(): string {\n return this.activatedBreakpoints[0] ? this.activatedBreakpoints[0].alias : '';\n }\n\n constructor(protected matchMedia: MatchMedia,\n protected breakpoints: BreakPointRegistry,\n protected hook: PrintHook) {\n this.observeActivations();\n }\n\n /**\n * Update styles on breakpoint activates or deactivates\n * @param mc\n */\n onMediaChange(mc: MediaChange) {\n const bp: BreakPoint | null = this.findByQuery(mc.mediaQuery);\n if (bp) {\n mc = mergeAlias(mc, bp);\n\n if (mc.matches && this.activatedBreakpoints.indexOf(bp) === -1) {\n this.activatedBreakpoints.push(bp);\n this.activatedBreakpoints.sort(sortDescendingPriority);\n\n this.updateStyles();\n\n } else if (!mc.matches && this.activatedBreakpoints.indexOf(bp) !== -1) {\n // Remove the breakpoint when it's deactivated\n this.activatedBreakpoints.splice(this.activatedBreakpoints.indexOf(bp), 1);\n this.activatedBreakpoints.sort(sortDescendingPriority);\n\n this.updateStyles();\n }\n }\n }\n\n /**\n * initialize the marshaller with necessary elements for delegation on an element\n * @param element\n * @param key\n * @param updateFn optional callback so that custom bp directives don't have to re-provide this\n * @param clearFn optional callback so that custom bp directives don't have to re-provide this\n * @param extraTriggers other triggers to force style updates (e.g. layout, directionality, etc)\n */\n init(element: HTMLElement,\n key: string,\n updateFn?: UpdateCallback,\n clearFn?: ClearCallback,\n extraTriggers: Observable<any>[] = []): void {\n\n initBuilderMap(this.updateMap, element, key, updateFn);\n initBuilderMap(this.clearMap, element, key, clearFn);\n\n this.buildElementKeyMap(element, key);\n this.watchExtraTriggers(element, key, extraTriggers);\n }\n\n /**\n * get the value for an element and key and optionally a given breakpoint\n * @param element\n * @param key\n * @param bp\n */\n getValue(element: HTMLElement, key: string, bp?: string): any {\n const bpMap = this.elementMap.get(element);\n if (bpMap) {\n const values = bp !== undefined ? bpMap.get(bp) : this.getActivatedValues(bpMap, key);\n if (values) {\n return values.get(key);\n }\n }\n return undefined;\n }\n\n /**\n * whether the element has values for a given key\n * @param element\n * @param key\n */\n hasValue(element: HTMLElement, key: string): boolean {\n const bpMap = this.elementMap.get(element);\n if (bpMap) {\n const values = this.getActivatedValues(bpMap, key);\n if (values) {\n return values.get(key) !== undefined || false;\n }\n }\n return false;\n }\n\n /**\n * Set the value for an input on a directive\n * @param element the element in question\n * @param key the type of the directive (e.g. flex, layout-gap, etc)\n * @param bp the breakpoint suffix (empty string = default)\n * @param val the value for the breakpoint\n */\n setValue(element: HTMLElement, key: string, val: any, bp: string): void {\n let bpMap: BreakpointMap | undefined = this.elementMap.get(element);\n if (!bpMap) {\n bpMap = new Map().set(bp, new Map().set(key, val));\n this.elementMap.set(element, bpMap);\n } else {\n const values = (bpMap.get(bp) || new Map()).set(key, val);\n bpMap.set(bp, values);\n this.elementMap.set(element, bpMap);\n }\n const value = this.getValue(element, key);\n if (value !== undefined) {\n this.updateElement(element, key, value);\n }\n }\n\n /** Track element value changes for a specific key */\n trackValue(element: HTMLElement, key: string): Observable<ElementMatcher> {\n return this.subject\n .asObservable()\n .pipe(filter(v => v.element === element && v.key === key));\n }\n\n /** update all styles for all elements on the current breakpoint */\n updateStyles(): void {\n this.elementMap.forEach((bpMap, el) => {\n const keyMap = new Set(this.elementKeyMap.get(el)!);\n let valueMap = this.getActivatedValues(bpMap);\n\n if (valueMap) {\n valueMap.forEach((v, k) => {\n this.updateElement(el, k, v);\n keyMap.delete(k);\n });\n }\n\n keyMap.forEach(k => {\n valueMap = this.getActivatedValues(bpMap, k);\n if (valueMap) {\n const value = valueMap.get(k);\n this.updateElement(el, k, value);\n } else {\n this.clearElement(el, k);\n }\n });\n\n });\n }\n\n /**\n * clear the styles for a given element\n * @param element\n * @param key\n */\n clearElement(element: HTMLElement, key: string): void {\n const builders = this.clearMap.get(element);\n if (builders) {\n const clearFn: ClearCallback = builders.get(key) as ClearCallback;\n if (!!clearFn) {\n clearFn();\n this.subject.next({element, key, value: ''});\n }\n }\n }\n\n /**\n * update a given element with the activated values for a given key\n * @param element\n * @param key\n * @param value\n */\n updateElement(element: HTMLElement, key: string, value: any): void {\n const builders = this.updateMap.get(element);\n if (builders) {\n const updateFn: UpdateCallback = builders.get(key) as UpdateCallback;\n if (!!updateFn) {\n updateFn(value);\n this.subject.next({element, key, value});\n }\n }\n }\n\n /**\n * release all references to a given element\n * @param element\n */\n releaseElement(element: HTMLElement): void {\n const watcherMap = this.watcherMap.get(element);\n if (watcherMap) {\n watcherMap.forEach(s => s.unsubscribe());\n this.watcherMap.delete(element);\n }\n const elementMap = this.elementMap.get(element);\n if (elementMap) {\n elementMap.forEach((_, s) => elementMap.delete(s));\n this.elementMap.delete(element);\n }\n }\n\n /**\n * trigger an update for a given element and key (e.g. layout)\n * @param element\n * @param key\n */\n triggerUpdate(element: HTMLElement, key?: string): void {\n const bpMap = this.elementMap.get(element);\n if (bpMap) {\n const valueMap = this.getActivatedValues(bpMap, key);\n if (valueMap) {\n if (key) {\n this.updateElement(element, key, valueMap.get(key));\n } else {\n valueMap.forEach((v, k) => this.updateElement(element, k, v));\n }\n }\n }\n }\n\n /** Cross-reference for HTMLElement with directive key */\n private buildElementKeyMap(element: HTMLElement, key: string) {\n let keyMap = this.elementKeyMap.get(element);\n if (!keyMap) {\n keyMap = new Set();\n this.elementKeyMap.set(element, keyMap);\n }\n keyMap.add(key);\n }\n\n /**\n * Other triggers that should force style updates:\n * - directionality\n * - layout changes\n * - mutationobserver updates\n */\n private watchExtraTriggers(element: HTMLElement,\n key: string,\n triggers: Observable<any>[]) {\n if (triggers && triggers.length) {\n let watchers = this.watcherMap.get(element);\n if (!watchers) {\n watchers = new Map();\n this.watcherMap.set(element, watchers);\n }\n const subscription = watchers.get(key);\n if (!subscription) {\n const newSubscription = merge(...triggers).subscribe(() => {\n const currentValue = this.getValue(element, key);\n this.updateElement(element, key, currentValue);\n });\n watchers.set(key, newSubscription);\n }\n }\n }\n\n /** Breakpoint locator by mediaQuery */\n private findByQuery(query: string) {\n return this.breakpoints.findByQuery(query);\n }\n\n /**\n * get the fallback breakpoint for a given element, starting with the current breakpoint\n * @param bpMap\n * @param key\n */\n private getActivatedValues(bpMap: BreakpointMap, key?: string): ValueMap | undefined {\n for (let i = 0; i < this.activatedBreakpoints.length; i++) {\n const activatedBp = this.activatedBreakpoints[i];\n const valueMap = bpMap.get(activatedBp.alias);\n if (valueMap) {\n if (key === undefined || valueMap.has(key)) {\n return valueMap;\n }\n }\n }\n const lastHope = bpMap.get('');\n return (key === undefined || lastHope && lastHope.has(key)) ? lastHope : undefined;\n }\n\n /**\n * Watch for mediaQuery breakpoint activations\n */\n private observeActivations() {\n const target = this as unknown as HookTarget;\n const queries = this.breakpoints.items.map(bp => bp.mediaQuery);\n\n this.matchMedia\n .observe(this.hook.withPrintQuery(queries))\n .pipe(\n tap(this.hook.interceptEvents(target)),\n filter(this.hook.blockPropagation())\n )\n .subscribe(this.onMediaChange.bind(this));\n }\n\n}\n\nfunction initBuilderMap(map: BuilderMap,\n element: HTMLElement,\n key: string,\n input?: UpdateCallback | ClearCallback): void {\n if (input !== undefined) {\n let oldMap = map.get(element);\n if (!oldMap) {\n oldMap = new Map();\n map.set(element, oldMap);\n }\n oldMap.set(key, input);\n }\n}\n\n","/**\n * @license\n * Copyright Google LLC 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 */\n\n /**\n * The flex API permits 3 or 1 parts of the value:\n * - `flex-grow flex-shrink flex-basis`, or\n * - `flex-basis`\n */\nexport function validateBasis(basis: string, grow = '1', shrink = '1'): string[] {\n let parts = [grow, shrink, basis];\n\n let j = basis.indexOf('calc');\n if (j > 0) {\n parts[2] = _validateCalcValue(basis.substring(j).trim());\n let matches = basis.substr(0, j).trim().split(' ');\n if (matches.length == 2) {\n parts[0] = matches[0];\n parts[1] = matches[1];\n }\n } else if (j == 0) {\n parts[2] = _validateCalcValue(basis.trim());\n } else {\n let matches = basis.split(' ');\n parts = (matches.length === 3) ? matches : [\n grow, shrink, basis\n ];\n }\n\n return parts;\n}\n\n\n/**\n * Calc expressions require whitespace before & after any expression operators\n * This is a simple, crude whitespace padding solution.\n * - '3 3 calc(15em + 20px)'\n * - calc(100% / 7 * 2)\n * - 'calc(15em + 20px)'\n * - 'calc(15em+20px)'\n * - '37px'\n * = '43%'\n */\nfunction _validateCalcValue(calc: string): string {\n return calc.replace(/[\\s]/g, '').replace(/[\\/\\*\\+\\-]/g, ' $& ');\n}\n","/**\n * @license\n * Copyright Google LLC 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 {StyleDefinition} from '../style-utils/style-utils';\n\n/** A class that encapsulates CSS style generation for common directives */\nexport abstract class StyleBuilder {\n\n /** Whether to cache the generated output styles */\n shouldCache = true;\n\n /** Build the styles given an input string and configuration object from a host */\n abstract buildStyles(input: string, parent?: Object): StyleDefinition;\n\n /**\n * Run a side effect computation given the input string and the computed styles\n * from the build task and the host configuration object\n * NOTE: This should be a no-op unless an algorithm is provided in a subclass\n */\n sideEffect(_input: string, _styles: StyleDefinition, _parent?: Object) {\n }\n}\n","/**\n * @license\n * Copyright Google LLC 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 {Inject, Injectable, Optional, PLATFORM_ID} from '@angular/core';\nimport {isPlatformBrowser, isPlatformServer} from '@angular/common';\n\nimport {applyCssPrefixes} from '../../utils/auto-prefixer';\nimport {StylesheetMap} from '../stylesheet-map/stylesheet-map';\nimport {SERVER_TOKEN} from '../tokens/server-token';\nimport {LAYOUT_CONFIG, LayoutConfigOptions} from '../tokens/library-config';\n\n@Injectable({providedIn: 'root'})\nexport class StyleUtils {\n\n constructor(@Optional() private _serverStylesheet: StylesheetMap,\n @Optional() @Inject(SERVER_TOKEN) private _serverModuleLoaded: boolean,\n @Inject(PLATFORM_ID) private _platformId: Object,\n @Inject(LAYOUT_CONFIG) private layoutConfig: LayoutConfigOptions) {}\n\n /**\n * Applies styles given via string pair or object map to the directive element\n */\n applyStyleToElement(element: HTMLElement,\n style: StyleDefinition | string,\n value: string | number | null = null) {\n let styles: StyleDefinition = {};\n if (typeof style === 'string') {\n styles[style] = value;\n style = styles;\n }\n styles = this.layoutConfig.disableVendorPrefixes ? style : applyCssPrefixes(style);\n this._applyMultiValueStyleToElement(styles, element);\n }\n\n /**\n * Applies styles given via string pair or object map to the directive's element\n */\n applyStyleToElements(style: StyleDefinition, elements: HTMLElement[] = []) {\n const styles = this.layoutConfig.disableVendorPrefixes ? style : applyCssPrefixes(style);\n elements.forEach(el => {\n this._applyMultiValueStyleToElement(styles, el);\n });\n }\n\n /**\n * Determine the DOM element's Flexbox flow (flex-direction)\n *\n * Check inline style first then check computed (stylesheet) style\n */\n getFlowDirection(target: HTMLElement): [string, string] {\n const query = 'flex-direction';\n let value = this.lookupStyle(target, query);\n const hasInlineValue = this.lookupInlineStyle(target, query) ||\n (isPlatformServer(this._platformId) && this._serverModuleLoaded) ? value : '';\n\n return [value || 'row', hasInlineValue];\n }\n\n /**\n * Find the DOM element's raw attribute value (if any)\n */\n lookupAttributeValue(element: HTMLElement, attribute: string): string {\n return element.getAttribute(attribute) || '';\n }\n\n /**\n * Find the DOM element's inline style value (if any)\n */\n lookupInlineStyle(element: HTMLElement, styleName: string): string {\n return isPlatformBrowser(this._platformId) ?\n element.style.getPropertyValue(styleName) : this._getServerStyle(element, styleName);\n }\n\n /**\n * Determine the inline or inherited CSS style\n * NOTE: platform-server has no implementation for getComputedStyle\n */\n lookupStyle(element: HTMLElement, styleName: string, inlineOnly = false): string {\n let value = '';\n if (element) {\n let immediateValue = value = this.lookupInlineStyle(element, styleName);\n if (!immediateValue) {\n if (isPlatformBrowser(this._platformId)) {\n if (!inlineOnly) {\n value = getComputedStyle(element).getPropertyValue(styleName);\n }\n } else {\n if (this._serverModuleLoaded) {\n value = this._serverStylesheet.getStyleForElement(element, styleName);\n }\n }\n }\n }\n\n // Note: 'inline' is the default of all elements, unless UA stylesheet overrides;\n // in which case getComputedStyle() should determine a valid value.\n return value ? value.trim() : '';\n }\n\n /**\n * Applies the styles to the element. The styles object map may contain an array of values\n * Each value will be added as element style\n * Keys are sorted to add prefixed styles (like -webkit-x) first, before the standard ones\n */\n private _applyMultiValueStyleToElement(styles: StyleDefinition,\n element: HTMLElement) {\n Object.keys(styles).sort().forEach(key => {\n const el = styles[key];\n const values: (string | number | null)[] = Array.isArray(el) ? el : [el];\n values.sort();\n for (let value of values) {\n value = value ? value + '' : '';\n if (isPlatformBrowser(this._platformId) || !this._serverModuleLoaded) {\n isPlatformBrowser(this._platformId) ?\n element.style.setProperty(key, value) : this._setServerStyle(element, key, value);\n } else {\n this._serverStylesheet.addStyleToElement(element, key, value);\n }\n }\n });\n }\n\n private _setServerStyle(element: any, styleName: string, styleValue?: string|null) {\n styleName = styleName.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n const styleMap = this._readStyleAttribute(element);\n styleMap[styleName] = styleValue || '';\n this._writeStyleAttribute(element, styleMap);\n }\n\n private _getServerStyle(element: any, styleName: string): string {\n const styleMap = this._readStyleAttribute(element);\n return styleMap[styleName] || '';\n }\n\n private _readStyleAttribute(element: any): {[name: string]: string} {\n const styleMap: {[name: string]: string} = {};\n const styleAttribute = element.getAttribute('style');\n if (styleAttribute) {\n const styleList = styleAttribute.split(/;+/g);\n for (let i = 0; i < styleList.length; i++) {\n const style = styleList[i].trim();\n if (style.length > 0) {\n const colonIndex = style.indexOf(':');\n if (colonIndex === -1) {\n throw new Error(`Invalid CSS style: ${style}`);\n }\n const name = style.substr(0, colonIndex).trim();\n styleMap[name] = style.substr(colonIndex + 1).trim();\n }\n }\n }\n return styleMap;\n }\n\n private _writeStyleAttribute(element: any, styleMap: {[name: string]: string}) {\n let styleAttrValue = '';\n for (const key in styleMap) {\n const newValue = styleMap[key];\n if (newValue) {\n styleAttrValue += key + ':' + styleMap[key] + ';';\n }\n }\n element.setAttribute('style', styleAttrValue);\n }\n}\n\n/**\n * Definition of a css style. Either a property name (e.g. \"flex-basis\") or an object\n * map of property name and value (e.g. {display: 'none', flex-order: 5})\n */\nexport type StyleDefinition = { [property: string]: string | number | null };\n","/**\n * @license\n * Copyright Google LLC 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 */\n/**\n * Applies CSS prefixes to appropriate style keys.\n *\n * Note: `-ms-`, `-moz` and `-webkit-box` are no longer supported. e.g.\n * {\n * display: -webkit-flex; NEW - Safari 6.1+. iOS 7.1+, BB10\n * display: flex; NEW, Spec - Firefox, Chrome, Opera\n * // display: -webkit-box; OLD - iOS 6-, Safari 3.1-6, BB7\n * // display: -ms-flexbox; TWEENER - IE 10\n * // display: -moz-flexbox; OLD - Firefox\n * }\n */\nexport function applyCssPrefixes(target: {[key: string]: any | null}) {\n for (let key in target) {\n let value = target[key] || '';\n\n switch (key) {\n case 'display':\n if (value === 'flex') {\n target['display'] = [\n '-webkit-flex',\n 'flex'\n ];\n } else if (value === 'inline-flex') {\n target['display'] = [\n '-webkit-inline-flex',\n 'inline-flex'\n ];\n } else {\n target['display'] = value;\n }\n break;\n\n case 'align-items':\n case 'align-self':\n case 'align-content':\n case 'flex':\n case 'flex-basis':\n case 'flex-flow':\n case 'flex-grow':\n case 'flex-shrink':\n case 'flex-wrap':\n case 'justify-content':\n target['-webkit-' + key] = value;\n break;\n\n case 'flex-direction':\n value = value || 'row';\n target['-webkit-flex-direction'] = value;\n target['flex-direction'] = value;\n break;\n\n case 'order':\n target['order'] = target['-webkit-' + key] = isNaN(+value) ? '0' : value;\n break;\n }\n }\n return target;\n}\n","/**\n * @license\n * Copyright Google LLC 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 {Inject, Injectable, PLATFORM_ID} from '@angular/core';\nimport {DOCUMENT, isPlatformBrowser} from '@angular/common';\n\nimport {fromEvent, Subscription} from 'rxjs';\nimport {take} from 'rxjs/operators';\n\nimport {mergeAlias} from '../add-alias';\nimport {MediaChange} from '../media-change';\nimport {MatchMedia} from '../match-media/match-media';\nimport {BreakPointRegistry, OptionalBreakPoint} from '../breakpoints/break-point-registry';\nimport {sortDescendingPriority} from '../utils/sort';\nimport {LAYOUT_CONFIG, LayoutConfigOptions} from '../tokens/library-config';\n\n/**\n * Class\n */\n@Injectable({providedIn: 'root'})\nexport class MediaTrigger {\n\n constructor(\n protected breakpoints: BreakPointRegistry,\n protected matchMedia: MatchMedia,\n @Inject(LAYOUT_CONFIG) protected layoutConfig: LayoutConfigOptions,\n @Inject(PLATFORM_ID) protected _platformId: Object,\n @Inject(DOCUMENT) protected _document: any) {\n }\n\n /**\n * Manually activate range of breakpoints\n * @param list array of mediaQuery or alias strings\n */\n activate(list: string[]) {\n list = list.map(it => it.trim()); // trim queries\n\n this.saveActivations();\n this.deactivateAll();\n this.setActivations(list);\n\n this.prepareAutoRestore();\n }\n\n /**\n * Restore original, 'real' breakpoints and emit events\n * to trigger stream notification\n */\n restore() {\n if (this.hasCachedRegistryMatches) {\n const extractQuery = (change: MediaChange) => change.mediaQuery;\n const list = this.originalActivations.map(extractQuery);\n try {\n\n this.deactivateAll();\n this.restoreRegistryMatches();\n this.setActivations(list);\n\n } finally {\n this.originalActivations = [];\n if (this.resizeSubscription) {\n this.resizeSubscription.unsubscribe();\n }\n }\n }\n }\n\n // ************************************************\n // Internal Methods\n // ************************************************\n\n /**\n * Whenever window resizes, immediately auto-restore original\n * activations (if we are simulating activations)\n */\n private prepareAutoRestore() {\n const isBrowser = isPlatformBrowser(this._platformId) && this._document;\n const enableAutoRestore = isBrowser && this.layoutConfig.mediaTriggerAutoRestore;\n\n if (enableAutoRestore) {\n const resize$ = fromEvent(window, 'resize').pipe(take(1));\n this.resizeSubscription = resize$.subscribe(this.restore.bind(this));\n }\n }\n\n /**\n * Notify all matchMedia subscribers of de-activations\n *\n * Note: we must force 'matches' updates for\n * future matchMedia::activation lookups\n */\n private deactivateAll() {\n const list = this.currentActivations;\n\n this.forceRegistryMatches(list, false);\n this.simulateMediaChanges(list, false);\n }\n\n /**\n * Cache current activations as sorted, prioritized list of MediaChanges\n */\n private saveActivations() {\n if (!this.hasCachedRegistryMatches) {\n const toMediaChange = (query: string) => new MediaChange(true, query);\n const mergeMQAlias = (change: MediaChange) => {\n const bp: OptionalBreakPoint = this.breakpoints.findByQuery(change.mediaQuery);\n return mergeAlias(change, bp);\n };\n\n this.originalActivations = this.currentActivations\n .map(toMediaChange)\n .map(mergeMQAlias)\n .sort(sortDescendingPriority);\n\n this.cacheRegistryMatches();\n }\n }\n\n /**\n * Force set manual activations for specified mediaQuery list\n */\n private setActivations(list: string[]) {\n if (!!this.originalRegistry) {\n this.forceRegistryMatches(list, true);\n }\n this.simulateMediaChanges(list);\n }\n\n /**\n * For specified mediaQuery list manually simulate activations or deactivations\n */\n private simulateMediaChanges(queries: string[], matches = true) {\n const toMediaQuery = (query: string) => {\n const locator = this.breakpoints;\n const bp = locator.findByAlias(query) || locator.findByQuery(query);\n return bp ? bp.mediaQuery : query;\n };\n const emitChangeEvent = (query: string) => this.emitChangeEvent(matches, query);\n\n queries.map(toMediaQuery).forEach(emitChangeEvent);\n }\n\n /**\n * Replace current registry with simulated registry...\n * Note: this is required since MediaQueryList::matches is 'readOnly'\n */\n private forceRegistryMatches(queries: string[], matches: boolean) {\n const registry = new Map<string, MediaQueryList>();\n queries.forEach(query => {\n registry.set(query, {matches: matches} as MediaQueryList);\n });\n\n this.matchMedia.registry = registry;\n }\n\n /**\n * Save current MatchMedia::registry items.\n */\n private cacheRegistryMatches() {\n const target = this.originalRegistry;\n\n target.clear();\n this.matchMedia.registry.forEach((value: MediaQueryList, key: string) => {\n target.set(key, value);\n });\n this.hasCachedRegistryMatches = true;\n }\n\n /**\n * Restore original, 'true' registry\n */\n private restoreRegistryMatches() {\n const target = this.matchMedia.registry;\n\n target.clear();\n this.originalRegistry.forEach((value: MediaQueryList, key: string) => {\n target.set(key, value);\n });\n\n this.originalRegistry.clear();\n this.hasCachedRegistryMatches = false;\n }\n\n /**\n * Manually emit a MediaChange event via the MatchMedia to MediaMarshaller and MediaObserver\n */\n private emitChangeEvent(matches: boolean, query: string) {\n this.matchMedia.source.next(new MediaChange(matches, query));\n }\n\n private get currentActivations() {\n return this.matchMedia.activations;\n }\n\n private hasCachedRegistryMatches = false;\n private originalActivations: MediaChange[] = [];\n private originalRegistry: Map<string, MediaQueryList> = new Map<string, MediaQueryList>();\n\n private resizeSubscription!: Subscription;\n}\n\n","/**\n * @license\n * Copyright Google LLC 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 {Injectable, OnDestroy} from '@angular/core';\nimport {Subject, asapScheduler, Observable, of} from 'rxjs';\nimport {debounceTime, filter, map, switchMap, takeUntil} from 'rxjs/operators';\n\nimport {mergeAlias} from '../add-alias';\nimport {MediaChange} from '../media-change';\nimport {MatchMedia} from '../match-media/match-media';\nimport {PrintHook} from '../media-marshaller/print-hook';\nimport {BreakPointRegistry, OptionalBreakPoint} from '../breakpoints/break-point-registry';\n\nimport {sortDescendingPriority} from '../utils/sort';\nimport {coerceArray} from '../utils/array';\n\n\n/**\n * MediaObserver enables applications to listen for 1..n mediaQuery activations and to determine\n * if a mediaQuery is currently activated.\n *\n * Since a breakpoint change will first deactivate 1...n mediaQueries and then possibly activate\n * 1..n mediaQueries, the MediaObserver will debounce notifications and report ALL *activations*\n * in 1 event notification. The reported activations will be sorted in descending priority order.\n *\n * This class uses the BreakPoint Registry to inject alias information into the raw MediaChange\n * notification. For custom mediaQuery notifications, alias information will not be injected and\n * those fields will be ''.\n *\n * Note: Developers should note that only mediaChange activations (not de-activations)\n * are announced by the MediaObserver.\n *\n * @usage\n *\n * // RxJS\n * import { filter } from 'rxjs/operators';\n * import { MediaObserver } from '@angular/flex-layout';\n *\n * @Component({ ... })\n * export class AppComponent {\n * status: string = '';\n *\n * constructor(mediaObserver: MediaObserver) {\n * const media$ = mediaObserver.asObservable().pipe(\n * filter((changes: MediaChange[]) => true) // silly noop filter\n * );\n *\n * media$.subscribe((changes: MediaChange[]) => {\n * let status = '';\n * changes.forEach( change => {\n * status += `'${change.mqAlias}' = (${change.mediaQuery}) <br/>` ;\n * });\n * this.status = status;\n * });\n *\n * }\n * }\n */\n@Injectable({providedIn: 'root'})\nexport class MediaObserver implements OnDestroy {\n\n /**\n * @deprecated Use `asObservable()` instead.\n * @breaking-change 8.0.0-beta.25\n * @deletion-target v8.0.0-beta.26\n */\n readonly media$: Observable<MediaChange>;\n\n /** Filter MediaChange notifications for overlapping breakpoints */\n filterOverlaps = false;\n\n constructor(protected breakpoints: BreakPointRegistry,\n protected matchMedia: MatchMedia,\n protected hook: PrintHook) {\n this._media$ = this.watchActivations();\n this.media$ = this._media$.pipe(\n filter((changes: MediaChange[]) => changes.length > 0),\n map((changes: MediaChange[]) => changes[0])\n );\n }\n\n /**\n * Completes the active subject, signalling to all complete for all\n * MediaObserver subscribers\n */\n ngOnDestroy(): void {\n this.destroyed$.next();\n this.destroyed$.complete();\n }\n\n // ************************************************\n // Public Methods\n // ************************************************\n\n /**\n * Observe changes to current activation 'list'\n */\n asObservable(): Observable<MediaChange[]> {\n return this._media$;\n }\n\n /**\n * Allow programmatic query to determine if one or more media query/alias match\n * the current viewport size.\n * @param value One or more media queries (or aliases) to check.\n * @returns Whether any of the media queries match.\n */\n isActive(value: string | string[]): boolean {\n const aliases = splitQueries(coerceArray(value));\n return aliases.some(alias => {\n const query = toMediaQuery(alias, this.breakpoints);\n return this.matchMedia.isActive(query);\n });\n }\n\n // ************************************************\n // Internal Methods\n // ************************************************\n\n /**\n * Register all the mediaQueries registered in the BreakPointRegistry\n * This is needed so subscribers can be auto-notified of all standard, registered\n * mediaQuery activations\n */\n private watchActivations() {\n const queries = this.breakpoints.items.map(bp => bp.mediaQuery);\n return this.buildObservable(queries);\n }\n\n /**\n * Only pass/announce activations (not de-activations)\n *\n * Since multiple-mediaQueries can be activation in a cycle,\n * gather all current activations into a single list of changes to observers\n *\n * Inject associated (if any) alias information into the MediaChange event\n * - Exclude mediaQuery activations for overlapping mQs. List bounded mQ ranges only\n * - Exclude print activations that do not have an associated mediaQuery\n *\n * NOTE: the raw MediaChange events [from MatchMedia] do not\n * contain important alias information; as such this info\n * must be injected into the MediaChange\n */\n private buildObservable(mqList: string[]): Observable<MediaChange[]> {\n const hasChanges = (changes: MediaChange[]) => {\n const isValidQuery = (change: MediaChange) => (change.mediaQuery.length > 0);\n return (changes.filter(isValidQuery).length > 0);\n };\n const excludeOverlaps = (changes: MediaChange[]) => {\n return !this.filterOverlaps ? changes : changes.filter(change => {\n const bp = this.breakpoints.findByQuery(change.mediaQuery);\n return !bp ? true : !bp.overlapping;\n });\n };\n\n /**\n */\n return this.matchMedia\n .observe(this.hook.withPrintQuery(mqList))\n .pipe(\n filter((change: MediaChange) => change.matches),\n debounceTime(0, asapScheduler),\n switchMap(_ => of(this.findAllActivations())),\n map(excludeOverlaps),\n filter(hasChanges),\n takeUntil(this.destroyed$)\n );\n }\n\n /**\n * Find all current activations and prepare single list of activations\n * sorted by descending priority.\n */\n private findAllActivations(): MediaChange[] {\n const mergeMQAlias = (change: MediaChange) => {\n let bp: OptionalBreakPoint = this.breakpoints.findByQuery(change.mediaQuery);\n return mergeAlias(change, bp);\n };\n const replaceWithPrintAlias = (change: MediaChange) => {\n return this.hook.isPrintEvent(change) ? this.hook.updateEvent(change) : change;\n };\n\n return this.matchMedia\n .activations\n .map(query => new MediaChange(true, query))\n .map(replaceWithPrintAlias)\n .map(mergeMQAlias)\n .sort(sortDescendingPriority);\n }\n\n private readonly _media$: Observable<MediaChange[]>;\n private readonly destroyed$ = new Subject<void>();\n}\n\n/**\n * Find associated breakpoint (if any)\n */\nfunction toMediaQuery(query: string, locator: BreakPointRegistry) {\n const bp = locator.findByAlias(query) || locator.findByQuery(query);\n return bp ? bp.mediaQuery : query;\n}\n\n/**\n * Split each query string into separate query strings if two queries are provided as comma\n * separated.\n */\nfunction splitQueries(queries: string[]): string[] {\n return queries.map((query: string) => query.split(','))\n .reduce((a1: string[], a2: string[]) => a1.concat(a2))\n .map(query => query.trim());\n}\n","/**\n * @license\n * Copyright Google LLC 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 */\n\n/** Wraps the provided value in an array, unless the provided value is an array. */\nexport function coerceArray<T>(value: T | T[]): T[] {\n return Array.isArray(value) ? value : [value];\n}\n","/**\n * @license\n * Copyright Google LLC 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 {Inject, Injectable} from '@angular/core';\n\nimport {mergeAlias} from '../add-alias';\nimport {MediaChange} from '../media-change';\nimport {BreakPoint} from '../breakpoints/break-point';\nimport {LAYOUT_CONFIG, LayoutConfigOptions} from '../tokens/library-config';\nimport {BreakPointRegistry, OptionalBreakPoint} from '../breakpoints/break-point-registry';\nimport {sortDescendingPriority} from '../utils/sort';\n\n/**\n * Interface to apply PrintHook to call anonymous `target.updateStyles()`\n */\nexport interface HookTarget {\n activatedBreakpoints: BreakPoint[];\n updateStyles(): void;\n}\n\nconst PRINT = 'print';\nexport const BREAKPOINT_PRINT = {\n alias: PRINT,\n mediaQuery: PRINT,\n priority: 1000\n};\n\n/**\n * PrintHook - Use to intercept print MediaQuery activations and force\n * layouts to render with the specified print alias/breakpoint\n *\n * Used in MediaMarshaller and MediaObserver\n */\n@Injectable({providedIn: 'root'})\nexport class PrintHook {\n constructor(\n protected breakpoints: BreakPointRegistry,\n @Inject(LAYOUT_CONFIG) protected layoutConfig: LayoutConfigOptions) {\n }\n\n /** Add 'print' mediaQuery: to listen for matchMedia activations */\n withPrintQuery(queries: string[]): string[] {\n return [...queries, PRINT];\n }\n\n /** Is the MediaChange event for any 'print' @media */\n isPrintEvent(e: MediaChange): Boolean {\n return e.mediaQuery.startsWith(PRINT);\n }\n\n /** What is the desired mqAlias to use while printing? */\n get printAlias(): string[] {\n return this.layoutConfig.printWithBreakpoints || [];\n }\n\n /** Lookup breakpoints associated with print aliases. */\n get printBreakPoints(): BreakPoint[] {\n return this.printAlias\n .map(alias => this.breakpoints.findByAlias(alias))\n .filter(bp => bp !== null) as BreakPoint[];\n }\n\n /** Lookup breakpoint associated with mediaQuery */\n getEventBreakpoints({mediaQuery}: MediaChange): BreakPoint[] {\n const bp = this.breakpoints.findByQuery(mediaQuery);\n const list = bp ? [...this.printBreakPoints, bp] : this.printBreakPoints;\n\n return list.sort(sortDescendingPriority);\n }\n\n /** Update event with printAlias mediaQuery information */\n updateEvent(event: MediaChange): MediaChange {\n let bp: OptionalBreakPoint = this.breakpoints.findByQuery(event.mediaQuery);\n if (this.isPrintEvent(event)) {\n // Reset from 'print' to first (highest priority) print breakpoint\n bp = this.getEventBreakpoints(event)[0];\n event.mediaQuery = bp ? bp.mediaQuery : '';\n }\n return mergeAlias(event, bp);\n }\n\n /**\n * Prepare RxJs filter operator with partial application\n * @return pipeable filter predicate\n */\n interceptEvents(target: HookTarget) {\n return (event: MediaChange) => {\n if (this.isPrintEvent(event)) {\n if (event.matches && !this.isPrinting) {\n this.startPrinting(target, this.getEventBreakpoints(event));\n target.updateStyles();\n\n } else if (!event.matches && this.isPrinting) {\n this.stopPrinting(target);\n target.updateStyles();\n }\n } else {\n this.collectActivations(event);\n }\n };\n }\n\n /** Stop mediaChange event propagation in event streams */\n blockPropagation() {\n return (event: MediaChange): boolean => {\n return !(this.isPrinting || this.isPrintEvent(event));\n };\n }\n\n /**\n * Save current activateBreakpoints (for later restore)\n * and substitute only the printAlias breakpoint\n */\n protected startPrinting(target: HookTarget, bpList: OptionalBreakPoint[]) {\n this.isPrinting = true;\n target.activatedBreakpoints = this.queue.addPrintBreakpoints(bpList);\n }\n\n /** For any print de-activations, reset the entire print queue */\n protected stopPrinting(target: HookTarget) {\n target.activatedBreakpoints = this.deactivations;\n this.deactivations = [];\n this.queue.clear();\n this.isPrinting = false;\n }\n\n /**\n * To restore pre-Print Activations, we must capture the proper\n * list of breakpoint activations BEFORE print starts. OnBeforePrint()\n * is not supported; so 'print' mediaQuery activations must be used.\n *\n * > But activated breakpoints are deactivated BEFORE 'print' activation.\n *\n * Let's capture all de-activations using the following logic:\n *\n * When not printing:\n * - clear cache when activating non-print breakpoint\n * - update cache (and sort) when deactivating\n *\n * When printing:\n * - sort and save when starting print\n * - restore as activatedTargets and clear when stop printing\n */\n collectActivations(event: MediaChange) {\n if (!this.isPrinting) {\n if (!event.matches) {\n const bp = this.breakpoints.findByQuery(event.mediaQuery);\n if (bp) { // Deactivating a breakpoint\n this.deactivations.push(bp);\n this.deactivations.sort(sortDescendingPriority);\n }\n } else {\n this.deactivations = [];\n }\n }\n }\n\n /** Is this service currently in Print-mode ? */\n private isPrinting = false;\n private queue: PrintQueue = new PrintQueue();\n private deactivations: BreakPoint[] = [];\n\n}\n\n// ************************************************************************\n// Internal Utility class 'PrintQueue'\n// ************************************************************************\n\n/**\n * Utility class to manage print breakpoints + activatedBreakpoints\n * with correct sorting WHILE printing\n */\nclass PrintQueue {\n /** Sorted queue with prioritized print breakpoints */\n printBreakpoints: BreakPoint[] = [];\n\n addPrintBreakpoints(bpList: OptionalBreakPoint[]): BreakPoint[] {\n bpList.push(BREAKPOINT_PRINT);\n bpList.sort(sortDescendingPriority);\n bpList.forEach(bp => this.addBreakpoint(bp));\n\n return this.printBreakpoints;\n }\n\n /** Add Print breakpoint to queue */\n addBreakpoint(bp: OptionalBreakPoint) {\n if (!!bp) {\n const bpInList = this.printBreakpoints.find(it => it.mediaQuery === bp.mediaQuery);\n if (bpInList === undefined) {\n // If this is a `printAlias` breakpoint, then append. If a true 'print' breakpoint,\n // register as highest priority in the queue\n this.printBreakpoints = isPrintBreakPoint(bp) ? [bp, ...this.printBreakpoints]\n : [...this.printBreakpoints, bp];\n }\n }\n }\n\n /** Restore original activated breakpoints and clear internal caches */\n clear() {\n this.printBreakpoints = [];\n }\n}\n\n// ************************************************************************\n// Internal Utility methods\n// ************************************************************************\n\n/** Only support intercept queueing if the Breakpoint is a print @media query */\nfunction isPrintBreakPoint(bp: OptionalBreakPoint) {\n return bp ? bp.mediaQuery.startsWith(PRINT) : false;\n}\n","/**\n * @license\n * Copyright Google LLC 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 {Inject, Injectable, NgZone, PLATFORM_ID} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\n\nimport {MatchMedia} from '../match-media';\nimport {BreakPointRegistry} from '../../breakpoints/break-point-registry';\n\n/**\n * MockMatchMedia mocks calls to the Window API matchMedia with a build of a simulated\n * MockMediaQueryListener. Methods are available to simulate an activation of a mediaQuery\n * range and to clearAll mediaQuery listeners.\n */\n@Injectable()\nexport class MockMatchMedia extends MatchMedia {\n\n\n autoRegisterQueries = true; // Used for testing BreakPoint registrations\n useOverlaps = false; // Allow fallback to overlapping mediaQueries\n\n constructor(_zone: NgZone,\n @Inject(PLATFORM_ID) _platformId: Object,\n @Inject(DOCUMENT) _document: any,\n private _breakpoints: BreakPointRegistry) {\n super(_zone, _platformId, _document);\n }\n\n /** Easy method to clear all listeners for all mediaQueries */\n clearAll() {\n this.registry.forEach((mql: MediaQueryList) => {\n (mql as MockMediaQueryList).destroy();\n });\n this.registry.clear();\n this.useOverlaps = false;\n }\n\n /** Feature to support manual, simulated activation of a mediaQuery. */\n activate(mediaQuery: string, useOverlaps = false): boolean {\n useOverlaps = useOverlaps || this.useOverlaps;\n mediaQuery = this._validateQuery(mediaQuery);\n\n if (useOverlaps || !this.isActive(mediaQuery)) {\n this._deactivateAll();\n\n this._registerMediaQuery(mediaQuery);\n this._activateWithOverlaps(mediaQuery, useOverlaps);\n }\n\n return this.hasActivated;\n }\n\n /** Converts an optional mediaQuery alias to a specific, valid mediaQuery */\n _validateQuery(queryOrAlias: string) {\n const bp = this._breakpoints.findByAlias(queryOrAlias);\n return (bp && bp.mediaQuery) || queryOrAlias;\n }\n\n /**\n * Manually onMediaChange any overlapping mediaQueries to simulate\n * similar functionality in the window.matchMedia()\n */\n private _activateWithOverlaps(mediaQuery: string, useOverlaps: boolean): boolean {\n if (useOverlaps) {\n const bp = this._breakpoints.findByQuery(mediaQuery);\n const alias = bp ? bp.alias : 'unknown';\n\n // Simulate activation of overlapping lt-<XXX> ranges\n switch (alias) {\n case 'lg' :\n this._activateByAlias('lt-xl');\n break;\n case 'md' :\n this._activateByAlias('lt-xl, lt-lg');\n break;\n case 'sm' :\n this._activateByAlias('lt-xl, lt-lg, lt-md');\n break;\n case 'xs' :\n this._activateByAlias('lt-xl, lt-lg, lt-md, lt-sm');\n break;\n }\n\n // Simulate activation of overlapping gt-<xxxx> mediaQuery ranges\n switch (alias) {\n case 'xl' :\n this._activateByAlias('gt-lg, gt-md, gt-sm, gt-xs');\n break;\n case 'lg' :\n this._activateByAlias('gt-md, gt-sm, gt-xs');\n break;\n case 'md' :\n this._activateByAlias('gt-sm, gt-xs');\n break;\n case 'sm' :\n this._activateByAlias('gt-xs');\n break;\n }\n }\n // Activate last since the responsiveActivation is watching *this* mediaQuery\n return this._activateByQuery(mediaQuery);\n }\n\n /**\n *\n */\n private _activateByAlias(aliases: string) {\n const activate = (alias: string) => {\n const bp = this._breakpoints.findByAlias(alias);\n this._activateByQuery(bp ? bp.mediaQuery : alias);\n };\n aliases.split(',').forEach(alias => activate(alias.trim()));\n }\n\n /**\n *\n */\n private _activateByQuery(mediaQuery: string) {\n const mql: MockMediaQueryList = this.registry.get(mediaQuery) as MockMediaQueryList;\n\n if (mql && !this.isActive(mediaQuery)) {\n this.registry.set(mediaQuery, mql.activate());\n }\n return this.hasActivated;\n }\n\n /** Deactivate all current MQLs and reset the buffer */\n private _deactivateAll() {\n this.registry.forEach((it: MediaQueryList) => {\n (it as MockMediaQueryList).deactivate();\n });\n return this;\n }\n\n /** Insure the mediaQuery is registered with MatchMedia */\n private _registerMediaQuery(mediaQuery: string) {\n if (!this.registry.has(mediaQuery) && this.autoRegisterQueries) {\n this.registerQuery(mediaQuery);\n }\n }\n\n /**\n * Call window.matchMedia() to build a MediaQueryList; which\n * supports 0..n listeners for activation/deactivation\n */\n protected buildMQL(query: string): MediaQueryList {\n return new MockMediaQueryList(query);\n }\n\n protected get hasActivated() {\n return this.activations.length > 0;\n }\n\n}\n\n/**\n * Special internal class to simulate a MediaQueryList and\n * - supports manual activation to simulate mediaQuery matching\n * - manages listeners\n */\nexport class MockMediaQueryList implements MediaQueryList {\n private _isActive = false;\n private _listeners: MediaQueryListListener[] = [];\n\n get matches(): boolean {\n return this._isActive;\n }\n\n get media(): string {\n return this._mediaQuery;\n }\n\n constructor(private _mediaQuery: string) {\n }\n\n /**\n * Destroy the current list by deactivating the\n * listeners and clearing the internal list\n */\n destroy() {\n this.deactivate();\n this._listeners = [];\n }\n\n /** Notify all listeners that 'matches === TRUE' */\n activate(): MockMediaQueryList {\n if (!this._isActive) {\n this._isActive = true;\n this._listeners.forEach((callback) => {\n const cb: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) = callback!;\n cb.call(null, this);\n });\n }\n return this;\n }\n\n /** Notify all listeners that 'matches === false' */\n deactivate(): MockMediaQueryList {\n if (this._isActive) {\n this._isActive = false;\n this._listeners.forEach((callback) => {\n const cb: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) = callback!;\n cb.call(null, this);\n });\n }\n return this;\n }\n\n /** Add a listener to our internal list to activate later */\n addListener(listener: MediaQueryListListener) {\n if (this._listeners.indexOf(listener) === -1) {\n this._listeners.push(listener);\n }\n if (this._isActive) {\n const cb: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) = listener!;\n cb.call(null, this);\n }\n }\n\n /** Don't need to remove listeners in the testing environment */\n removeListener(_: MediaQueryListListener | null) {\n }\n\n addEventListener<K extends keyof MediaQueryListEventMap>(\n _: K,\n __: (this: MediaQueryList,\n ev: MediaQueryListEventMap[K]) => any,\n ___?: boolean | AddEventListenerOptions): void;\n\n addEventListener(\n _: string,\n __: EventListenerOrEventListenerObject,\n ___?: boolean | AddEventListenerOptions) {\n }\n\n removeEventListener<K extends keyof MediaQueryListEventMap>(\n _: K,\n __: (this: MediaQueryList,\n ev: MediaQueryListEventMap[K]) => any,\n ___?: boolean | EventListenerOptions): void;\n\n removeEventListener(\n _: string,\n __: EventListenerOrEventListenerObject,\n ___?: boolean | EventListenerOptions) {\n }\n\n dispatchEvent(_: Event): boolean {\n return false;\n }\n\n onchange: MediaQueryListListener = null;\n}\n\n/**\n * Pre-configured provider for MockMatchMedia\n */\nexport const MockMatchMediaProvider = { // tslint:disable-line:variable-name\n provide: MatchMedia,\n useClass: MockMatchMedia\n};\n\ntype MediaQueryListListener = ((this: MediaQueryList, ev: MediaQueryListEvent) => any) | null;\n","/**\n * @license\n * Copyright Google LLC 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 {Inject, Injectable, NgZone, PLATFORM_ID} from '@angular/core';\nimport {DOCUMENT, isPlatformBrowser} from '@angular/common';\nimport {BehaviorSubject, Observable, merge, Observer} from 'rxjs';\nimport {filter} from 'rxjs/operators';\n\nimport {MediaChange} from '../media-change';\n\n/**\n * MediaMonitor configures listeners to mediaQuery changes and publishes an Observable facade to\n * convert mediaQuery change callbacks to subscriber notifications. These notifications will be\n * performed within the ng Zone to trigger change detections and component updates.\n *\n * NOTE: both mediaQuery activations and de-activations are announced in notifications\n */\n@Injectable({providedIn: 'root'})\nexport class MatchMedia {\n /** Initialize source with 'all' so all non-responsive APIs trigger style updates */\n readonly source = new BehaviorSubject<MediaChange>(new MediaChange(true));\n registry = new Map<string, MediaQueryList>();\n\n constructor(protected _zone: NgZone,\n @Inject(PLATFORM_ID) protected _platformId: Object,\n @Inject(DOCUMENT) protected _document: any) {\n }\n\n /**\n * Publish list of all current activations\n */\n get activations(): string[] {\n const results: string[] = [];\n this.registry.forEach((mql: MediaQueryList, key: string) => {\n if (mql.matches) {\n results.push(key);\n }\n });\n return results;\n }\n\n /**\n * For the specified mediaQuery?\n */\n isActive(mediaQuery: string): boolean {\n const mql = this.registry.get(mediaQuery);\n return !!mql ? mql.matches : false;\n }\n\n /**\n * External observers can watch for all (or a specific) mql changes.\n *\n * If a mediaQuery is not specified, then ALL mediaQuery activations will\n * be announced.\n */\n observe(): Observable<MediaChange>;\n observe(mediaQueries: string[]): Observable<MediaChange>;\n observe(mediaQueries: string[], filterOthers: boolean): Observable<MediaChange>;\n\n /**\n * External observers can watch for all (or a specific) mql changes.\n * Typically used by the MediaQueryAdaptor; optionally available to components\n * who wish to use the MediaMonitor as mediaMonitor$ observable service.\n *\n * Use deferred registration process to register breakpoints only on subscription\n * This logic also enforces logic to register all mediaQueries BEFORE notify\n * subscribers of notifications.\n */\n observe(mqList?: string[], filterOthers = false): Observable<MediaChange> {\n if (mqList && mqList.length) {\n const matchMedia$: Observable<MediaChange> = this._observable$.pipe(\n filter((change: MediaChange) => {\n return !filterOthers ? true : (mqList.indexOf(change.mediaQuery) > -1);\n })\n );\n const registration$: Observable<MediaChange> = new Observable((observer: Observer<MediaChange>) => { // tslint:disable-line:max-line-length\n const matches: Array<MediaChange> = this.registerQuery(mqList);\n if (matches.length) {\n const lastChange = matches.pop()!;\n matches.forEach((e: MediaChange) => {\n observer.next(e);\n });\n this.source.next(lastChange); // last match is cached\n }\n observer.complete();\n });\n return merge(registration$, matchMedia$);\n }\n\n return this._observable$;\n }\n\n /**\n * Based on the BreakPointRegistry provider, register internal listeners for each unique\n * mediaQuery. Each listener emits specific MediaChange data to observers\n */\n registerQuery(mediaQuery: string | string[]) {\n const list = Array.isArray(mediaQuery) ? mediaQuery : [mediaQuery];\n const matches: MediaChange[] = [];\n\n buildQueryCss(list, this._document);\n\n list.forEach((query: string) => {\n const onMQLEvent = (e: MediaQueryListEvent) => {\n this._zone.run(() => this.source.next(new MediaChange(e.matches, query)));\n };\n\n let mql = this.registry.get(query);\n if (!mql) {\n mql = this.buildMQL(query);\n mql.addListener(onMQLEvent);\n this.registry.set(query, mql);\n }\n\n if (mql.matches) {\n matches.push(new MediaChange(true, query));\n }\n });\n\n return matches;\n }\n\n /**\n * Call window.matchMedia() to build a MediaQueryList; which\n * supports 0..n listeners for activation/deactivation\n */\n protected buildMQL(query: string): MediaQueryList {\n return constructMql(query, isPlatformBrowser(this._platformId));\n }\n\n protected _observable$ = this.source.asObservable();\n}\n\n/**\n * Private global registry for all dynamically-created, injected style tags\n * @see prepare(query)\n */\nconst ALL_STYLES: { [key: string]: any } = {};\n\n/**\n * For Webkit engines that only trigger the MediaQueryList Listener\n * when there is at least one CSS selector for the respective media query.\n *\n * @param mediaQueries\n * @param _document\n */\nfunction buildQueryCss(mediaQueries: string[], _document: Document) {\n const list = mediaQueries.filter(it => !ALL_STYLES[it]);\n if (list.length > 0) {\n const query = list.join(', ');\n\n try {\n const styleEl = _document.createElement('style');\n\n styleEl.setAttribute('type', 'text/css');\n if (!(styleEl as any).styleSheet) {\n const cssText = `\n/*\n @angular/flex-layout - workaround for possible browser quirk with mediaQuery listeners\n see http://bit.ly/2sd4HMP\n*/\n@media ${query} {.fx-query-test{ }}\n`;\n styleEl.appendChild(_document.createTextNode(cssText));\n }\n\n _document.head!.appendChild(styleEl);\n\n // Store in private global registry\n list.forEach(mq => ALL_STYLES[mq] = styleEl);\n\n } catch (e) {\n console.error(e);\n }\n }\n}\n\nfunction constructMql(query: string, isBrowser: boolean): MediaQueryList {\n const canListen = isBrowser && !!(<Window>window).matchMedia('all').addListener;\n\n return canListen ? (<Window>window).matchMedia(query) : {\n matches: query === 'all' || query === '',\n media: query,\n addListener: () => {\n },\n removeListener: () => {\n }\n } as unknown as MediaQueryList;\n}\n","/**\n * @license\n * Copyright Google LLC 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 {Injectable, Inject} from '@angular/core';\n\nimport {BreakPoint} from './break-point';\nimport {BREAKPOINTS} from './break-points-token';\nimport {sortAscendingPriority} from '../utils/sort';\n\nexport type OptionalBreakPoint = BreakPoint | null;\n\n/**\n * Registry of 1..n MediaQuery breakpoint ranges\n * This is published as a provider and may be overridden from custom, application-specific ranges\n *\n */\n@Injectable({providedIn: 'root'})\nexport class BreakPointRegistry {\n readonly items: BreakPoint[];\n\n constructor(@Inject(BREAKPOINTS) list: BreakPoint[]) {\n this.items = [...list].sort(sortAscendingPriority);\n }\n\n /**\n * Search breakpoints by alias (e.g. gt-xs)\n */\n findByAlias(alias: string): OptionalBreakPoint {\n return !alias ? null : this.findWithPredicate(alias, (bp) => bp.alias == alias);\n }\n\n findByQuery(query: string): OptionalBreakPoint {\n return this.findWithPredicate(query, (bp) => bp.mediaQuery == query);\n }\n\n /**\n * Get all the breakpoints whose ranges could overlapping `normal` ranges;\n * e.g. gt-sm overlaps md, lg, and xl\n */\n get overlappings(): BreakPoint[] {\n return this.items.filter(it => it.overlapping == true);\n }\n\n /**\n * Get list of all registered (non-empty) breakpoint aliases\n */\n get aliases(): string[] {\n return this.items.map(it => it.alias);\n }\n\n /**\n * Aliases are mapped to properties using suffixes\n * e.g. 'gt-sm' for property 'layout' uses suffix 'GtSm'\n * for property layoutGtSM.\n */\n get suffixes(): string[] {\n return this.items.map(it => !!it.suffix ? it.suffix : '');\n }\n\n /**\n * Memoized lookup using custom predicate function\n */\n private findWithPredicate(key: string,\n searchFn: (bp: BreakPoint) => boolean): OptionalBreakPoint {\n let response = this.findByMap.get(key);\n if (!response) {\n response = this.items.find(searchFn) || null;\n this.findByMap.set(key, response);\n }\n return response || null;\n\n }\n\n /**\n * Memoized BreakPoint Lookups\n */\n private readonly findByMap = new Map<String, OptionalBreakPoint>();\n}\n\n","/**\n * @license\n * Copyright Google LLC 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 */\n\ninterface WithPriority {\n priority?: number;\n}\n\n/** HOF to sort the breakpoints by descending priority */\nexport function sortDescendingPriority<T extends WithPriority>(a: T | null, b: T | null): number {\n const priorityA = a ? a.priority || 0 : 0;\n const priorityB = b ? b.priority || 0 : 0;\n return priorityB - priorityA;\n}\n\n/** HOF to sort the breakpoints by ascending priority */\nexport function sortAscendingPriority<T extends WithPriority>(a: T, b: T): number {\n const pA = a.priority || 0;\n const pB = b.priority || 0;\n return pA - pB;\n}\n","/**\n * @license\n * Copyright Google LLC 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 */\n\nimport {inject, InjectionToken} from '@angular/core';\nimport {BreakPoint} from './break-point';\nimport {BREAKPOINT} from '../tokens/breakpoint-token';\nimport {DEFAULT_BREAKPOINTS} from '../breakpoints/data/break-points';\nimport {ORIENTATION_BREAKPOINTS} from '../breakpoints/data/orientation-break-points';\nimport {mergeByAlias} from '../breakpoints/breakpoint-tools';\nimport {LAYOUT_CONFIG} from '../tokens/library-config';\n\n/**\n * Injection token unique to the flex-layout library.\n * Use this token when build a custom provider (see below).\n */\nexport const BREAKPOINTS =\n new InjectionToken<BreakPoint[]>('Token (@angular/flex-layout) Breakpoints', {\n providedIn: 'root',\n factory: () => {\n const breakpoints: any = inject(BREAKPOINT);\n const layoutConfig = inject(LAYOUT_CONFIG);\n const bpFlattenArray: BreakPoint[] = [].concat.apply([], (breakpoints || [])\n .map((v: BreakPoint | BreakPoint[]) => Array.isArray(v) ? v : [v]));\n const builtIns = (layoutConfig.disableDefaultBps ? [] : DEFAULT_BREAKPOINTS)\n .concat(layoutConfig.addOrientationBps ? ORIENTATION_BREAKPOINTS : []);\n\n return mergeByAlias(builtIns, bpFlattenArray);\n }\n });\n","/**\n * @license\n * Copyright Google LLC 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 {BreakPoint} from './break-point';\nimport {extendObject} from '../../utils/object-extend';\n\nconst ALIAS_DELIMITERS = /(\\.|-|_)/g;\nfunction firstUpperCase(part: string) {\n let first = part.length > 0 ? part.charAt(0) : '';\n let remainder = (part.length > 1) ? part.slice(1) : '';\n return first.toUpperCase() + remainder;\n}\n\n/**\n * Converts snake-case to SnakeCase.\n * @param name Text to UpperCamelCase\n */\nfunction camelCase(name: string): string {\n return name\n .replace(ALIAS_DELIMITERS, '|')\n .split('|')\n .map(firstUpperCase)\n .join('');\n}\n\n/**\n * For each breakpoint, ensure that a Suffix is defined;\n * fallback to UpperCamelCase the unique Alias value\n */\nexport function validateSuffixes(list: BreakPoint[]): BreakPoint[] {\n list.forEach((bp: BreakPoint) => {\n if (!bp.suffix) {\n bp.suffix = camelCase(bp.alias); // create Suffix value based on alias\n bp.overlapping = !!bp.overlapping; // ensure default value\n }\n });\n return list;\n}\n\n/**\n * Merge a custom breakpoint list with the default list based on unique alias values\n * - Items are added if the alias is not in the default list\n * - Items are merged with the custom override if the alias exists in the default list\n */\nexport function mergeByAlias(defaults: BreakPoint[], custom: BreakPoint[] = []): BreakPoint[] {\n const dict: {[key: string]: BreakPoint} = {};\n defaults.forEach(bp => {\n dict[bp.alias] = bp;\n });\n // Merge custom breakpoints\n custom.forEach((bp: BreakPoint) => {\n if (dict[bp.alias]) {\n extendObject(dict[bp.alias], bp);\n } else {\n dict[bp.alias] = bp;\n }\n });\n\n return validateSuffixes(Object.keys(dict).map(k => dict[k]));\n}\n","/**\n * @license\n * Copyright Google LLC 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 */\n/**\n * Extends an object with the *enumerable* and *own* properties of one or more source objects,\n * similar to Object.assign.\n *\n * @param dest The object which will have properties copied to it.\n * @param sources The source objects from which properties will be copied.\n */\nexport function extendObject(dest: any, ...sources: any[]): any {\n if (dest == null) {\n throw TypeError('Cannot convert undefined or null to object');\n }\n\n for (let source of sources) {\n if (source != null) {\n for (let key in source) {\n if (source.hasOwnProperty(key)) {\n dest[key] = source[key];\n }\n }\n }\n }\n\n return dest;\n}\n","/**\n * @license\n * Copyright Google LLC 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 */\n\nimport {BreakPoint} from '../break-point';\n\n/* tslint:disable */\nconst HANDSET_PORTRAIT = '(orientation: portrait) and (max-width: 599.99px)';\nconst HANDSET_LANDSCAPE = '(orientation: landscape) and (max-width: 959.99px)';\n\nconst TABLET_PORTRAIT = '(orientation: portrait) and (min-width: 600px) and (max-width: 839.99px)';\nconst TABLET_LANDSCAPE = '(orientation: landscape) and (min-width: 960px) and (max-width: 1279.99px)';\n\nconst WEB_PORTRAIT = '(orientation: portrait) and (min-width: 840px)';\nconst WEB_LANDSCAPE = '(orientation: landscape) and (min-width: 1280px)';\n\nexport const ScreenTypes = {\n 'HANDSET' : `${HANDSET_PORTRAIT}, ${HANDSET_LANDSCAPE}`,\n 'TABLET' : `${TABLET_PORTRAIT} , ${TABLET_LANDSCAPE}`,\n 'WEB' : `${WEB_PORTRAIT}, ${WEB_LANDSCAPE} `,\n\n 'HANDSET_PORTRAIT' : `${HANDSET_PORTRAIT}`,\n 'TABLET_PORTRAIT' : `${TABLET_PORTRAIT} `,\n 'WEB_PORTRAIT' : `${WEB_PORTRAIT}`,\n\n 'HANDSET_LANDSCAPE' : `${HANDSET_LANDSCAPE}]`,\n 'TABLET_LANDSCAPE' : `${TABLET_LANDSCAPE}`,\n 'WEB_LANDSCAPE' : `${WEB_LANDSCAPE}`\n};\n\n/**\n * Extended Breakpoints for handset/tablets with landscape or portrait orientations\n */\nexport const ORIENTATION_BREAKPOINTS : BreakPoint[] = [\n {'alias': 'handset', priority: 2000, 'mediaQuery': ScreenTypes.HANDSET},\n {'alias': 'handset.landscape', priority: 2000, 'mediaQuery': ScreenTypes.HANDSET_LANDSCAPE},\n {'alias': 'handset.portrait', priority: 2000, 'mediaQuery': ScreenTypes.HANDSET_PORTRAIT},\n\n {'alias': 'tablet', priority: 2100, 'mediaQuery': ScreenTypes.TABLET},\n {'alias': 'tablet.landscape', priority: 2100, 'mediaQuery': ScreenTypes.TABLET},\n {'alias': 'tablet.portrait', priority: 2100, 'mediaQuery': ScreenTypes.TABLET_PORTRAIT},\n\n {'alias': 'web', priority: 2200, 'mediaQuery': ScreenTypes.WEB, overlapping : true },\n {'alias': 'web.landscape', priority: 2200, 'mediaQuery': ScreenTypes.WEB_LANDSCAPE, overlapping : true },\n {'alias': 'web.portrait', priority: 2200, 'mediaQuery': ScreenTypes.WEB_PORTRAIT, overlapping : true }\n];\n","/**\n * @license\n * Copyright Google LLC 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 {BreakPoint} from '../break-point';\n\n/**\n * NOTE: Smaller ranges have HIGHER priority since the match is more specific\n */\nexport const DEFAULT_BREAKPOINTS: BreakPoint[] = [\n {\n alias: 'xs',\n mediaQuery: 'screen and (min-width: 0px) and (max-width: 599.99px)',\n priority: 1000,\n },\n {\n alias: 'sm',\n mediaQuery: 'screen and (min-width: 600px) and (max-width: 959.99px)',\n priority: 900,\n },\n {\n alias: 'md',\n mediaQuery: 'screen and (min-width: 960px) and (max-width: 1279.99px)',\n priority: 800,\n },\n {\n alias: 'lg',\n mediaQuery: 'screen and (min-width: 1280px) and (max-width: 1919.99px)',\n priority: 700,\n },\n {\n alias: 'xl',\n mediaQuery: 'screen and (min-width: 1920px) and (max-width: 4999.99px)',\n priority: 600,\n },\n {\n alias: 'lt-sm',\n overlapping: true,\n mediaQuery: 'screen and (max-width: 599.99px)',\n priority: 950,\n },\n {\n alias: 'lt-md',\n overlapping: true,\n mediaQuery: 'screen and (max-width: 959.99px)',\n priority: 850,\n },\n {\n alias: 'lt-lg',\n overlapping: true,\n mediaQuery: 'screen and (max-width: 1279.99px)',\n priority: 750,\n },\n {\n alias: 'lt-xl',\n overlapping: true,\n priority: 650,\n mediaQuery: 'screen and (max-width: 1919.99px)',\n },\n {\n alias: 'gt-xs',\n overlapping: true,\n mediaQuery: 'screen and (min-width: 600px)',\n priority: -950,\n },\n {\n alias: 'gt-sm',\n overlapping: true,\n mediaQuery: 'screen and (min-width: 960px)',\n priority: -850,\n }, {\n alias: 'gt-md',\n overlapping: true,\n mediaQuery: 'screen and (min-width: 1280px)',\n priority: -750,\n },\n {\n alias: 'gt-lg',\n overlapping: true,\n mediaQuery: 'screen and (min-width: 1920px)',\n priority: -650,\n }\n];\n\n","/**\n * @license\n * Copyright Google LLC 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 {ElementRef, OnChanges, OnDestroy, SimpleChanges} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\n\nimport {StyleDefinition, StyleUtils} from '../style-utils/style-utils';\nimport {StyleBuilder} from '../style-builder/style-builder';\nimport {MediaMarshaller} from '../media-marshaller/media-marshaller';\nimport {buildLayoutCSS} from '../../utils/layout-validator';\n\nexport abstract class BaseDirective2 implements OnChanges, OnDestroy {\n\n protected DIRECTIVE_KEY = '';\n protected inputs: string[] = [];\n /** The most recently used styles for the builder */\n protected mru: StyleDefinition = {};\n protected destroySubject: Subject<void> = new Subject();\n\n /** Access to host element's parent DOM node */\n protected get parentElement(): HTMLElement | null {\n return this.elementRef.nativeElement.parentElement;\n }\n\n /** Access to the HTMLElement for the directive */\n protected get nativeElement(): HTMLElement {\n return this.elementRef.nativeElement;\n }\n\n /** Access to the activated value for the directive */\n get activatedValue(): string {\n return this.marshal.getValue(this.nativeElement, this.DIRECTIVE_KEY);\n }\n set activatedValue(value: string) {\n this.marshal.setValue(this.nativeElement, this.DIRECTIVE_KEY, value,\n this.marshal.activatedAlias);\n }\n\n /** Cache map for style computation */\n protected styleCache: Map<string, StyleDefinition> = new Map();\n\n protected constructor(protected elementRef: ElementRef,\n protected styleBuilder: StyleBuilder,\n protected styler: StyleUtils,\n protected marshal: MediaMarshaller) {\n }\n\n /** For @Input changes */\n ngOnChanges(changes: SimpleChanges) {\n Object.keys(changes).forEach(key => {\n if (this.inputs.indexOf(key) !== -1) {\n const bp = key.split('.').slice(1).join('.');\n const val = changes[key].currentValue;\n this.setValue(val, bp);\n }\n });\n }\n\n ngOnDestroy(): void {\n this.destroySubject.next();\n this.destroySubject.complete();\n this.marshal.releaseElement(this.nativeElement);\n }\n\n /** Register with central marshaller service */\n protected init(extraTriggers: Observable<any>[] = []): void {\n this.marshal.init(\n this.elementRef.nativeElement,\n this.DIRECTIVE_KEY,\n this.updateWithValue.bind(this),\n this.clearStyles.bind(this),\n extraTriggers\n );\n }\n\n /** Add styles to the element using predefined style builder */\n protected addStyles(input: string, parent?: Object) {\n const builder = this.styleBuilder;\n const useCache = builder.shouldCache;\n\n let genStyles: StyleDefinition | undefined = this.styleCache.get(input);\n\n if (!genStyles || !useCache) {\n genStyles = builder.buildStyles(input, parent);\n if (useCache) {\n this.styleCache.set(input, genStyles);\n }\n }\n\n this.mru = {...genStyles};\n this.applyStyleToElement(genStyles);\n builder.sideEffect(input, genStyles, parent);\n }\n\n /** Remove generated styles from an element using predefined style builder */\n protected clearStyles() {\n Object.keys(this.mru).forEach(k => {\n this.mru[k] = '';\n });\n this.applyStyleToElement(this.mru);\n this.mru = {};\n }\n\n /** Force trigger style updates on DOM element */\n protected triggerUpdate() {\n this.marshal.triggerUpdate(this.nativeElement, this.DIRECTIVE_KEY);\n }\n\n /**\n * Determine the DOM element's Flexbox flow (flex-direction).\n *\n * Check inline style first then check computed (stylesheet) style.\n * And optionally add the flow value to element's inline style.\n */\n protected getFlexFlowDirection(target: HTMLElement, addIfMissing = false): string {\n if (target) {\n const [value, hasInlineValue] = this.styler.getFlowDirection(target);\n\n if (!hasInlineValue && addIfMissing) {\n const style = buildLayoutCSS(value);\n const elements = [target];\n this.styler.applyStyleToElements(style, elements);\n }\n\n return value.trim();\n }\n\n return 'row';\n }\n\n /** Applies styles given via string pair or object map to the directive element */\n protected applyStyleToElement(style: StyleDefinition,\n value?: string | number,\n element: HTMLElement = this.nativeElement) {\n this.styler.applyStyleToElement(element, style, value);\n }\n\n protected setValue(val: any, bp: string): void {\n this.marshal.setValue(this.nativeElement, this.DIRECTIVE_KEY, val, bp);\n }\n\n protected updateWithValue(input: string) {\n this.addStyles(input);\n }\n}\n","/**\n * @license\n * Copyright Google LLC 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 */\nexport const INLINE = 'inline';\nexport const LAYOUT_VALUES = ['row', 'column', 'row-reverse', 'column-reverse'];\n\n/**\n * Validate the direction|'direction wrap' value and then update the host's inline flexbox styles\n */\nexport function buildLayoutCSS(value: string) {\n let [direction, wrap, isInline] = validateValue(value);\n return buildCSS(direction, wrap, isInline);\n }\n\n/**\n * Validate the value to be one of the acceptable value options\n * Use default fallback of 'row'\n */\nexport function validateValue(value: string): [string, string, boolean] {\n value = value ? value.toLowerCase() : '';\n let [direction, wrap, inline] = value.split(' ');\n\n // First value must be the `flex-direction`\n if (!LAYOUT_VALUES.find(x => x === direction)) {\n direction = LAYOUT_VALUES[0];\n }\n\n if (wrap === INLINE) {\n wrap = (inline !== INLINE) ? inline : '';\n inline = INLINE;\n }\n\n return [direction, validateWrapValue(wrap), !!inline];\n}\n\n/**\n * Determine if the validated, flex-direction value specifies\n * a horizontal/row flow.\n */\nexport function isFlowHorizontal(value: string): boolean {\n let [flow, ] = validateValue(value);\n return flow.indexOf('row') > -1;\n}\n\n/**\n * Convert layout-wrap='<value>' to expected flex-wrap style\n */\nexport function validateWrapValue(value: string) {\n if (!!value) {\n switch (value.toLowerCase()) {\n case 'reverse':\n case 'wrap-reverse':\n case 'reverse-wrap':\n value = 'wrap-reverse';\n break;\n\n case 'no':\n case 'none':\n case 'nowrap':\n value = 'nowrap';\n break;\n\n // All other values fallback to 'wrap'\n default:\n value = 'wrap';\n break;\n }\n }\n return value;\n}\n\n/**\n * Build the CSS that should be assigned to the element instance\n * BUG:\n * 1) min-height on a column flex container won’t apply to its flex item children in IE 10-11.\n * Use height instead if possible; height : <xxx>vh;\n *\n * This way any padding or border specified on the child elements are\n * laid out and drawn inside that element's specified width and height.\n */\nfunction buildCSS(direction: string, wrap: string | null = null, inline = false) {\n return {\n 'display': inline ? 'inline-flex' : 'flex',\n 'box-sizing': 'border-box',\n 'flex-direction': direction,\n 'flex-wrap': !!wrap ? wrap : null\n };\n}\n","/**\n * @license\n * Copyright Google LLC 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 {MediaChange} from './media-change';\nimport {BreakPoint} from './breakpoints/break-point';\n\n/**\n * For the specified MediaChange, make sure it contains the breakpoint alias\n * and suffix (if available).\n */\nexport function mergeAlias(dest: MediaChange, source: BreakPoint | null): MediaChange {\n dest = dest ? dest.clone() : new MediaChange();\n if (source) {\n dest.mqAlias = source.alias;\n dest.mediaQuery = source.mediaQuery;\n dest.suffix = source.suffix as string;\n dest.priority = source.priority as number;\n }\n return dest;\n}\n","/**\n * @license\n * Copyright Google LLC 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 {InjectionToken} from '@angular/core';\nimport {BreakPoint} from '../breakpoints/break-point';\n\nexport const BREAKPOINT = new InjectionToken<BreakPoint|BreakPoint[]|null>(\n 'Flex Layout token, collect all breakpoints into one provider', {\n providedIn: 'root',\n factory: () => null\n });\n","/**\n * @license\n * Copyright Google LLC 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 {InjectionToken} from '@angular/core';\n\n/**\n * Token that is provided to tell whether the FlexLayoutServerModule\n * has been included in the bundle\n *\n * NOTE: This can be manually provided to disable styles when using SSR\n */\nexport const SERVER_TOKEN = new InjectionToken<boolean>(\n 'FlexLayoutServerLoaded', {\n providedIn: 'root',\n factory: () => false\n });\n","/**\n * @license\n * Copyright Google LLC 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 {InjectionToken} from '@angular/core';\n\n/** a set of configuration options for FlexLayoutModule */\nexport interface LayoutConfigOptions {\n addFlexToParent?: boolean;\n addOrientationBps?: boolean;\n disableDefaultBps?: boolean;\n disableVendorPrefixes?: boolean;\n serverLoaded?: boolean;\n useColumnBasisZero?: boolean;\n printWithBreakpoints?: string[];\n mediaTriggerAutoRestore?: boolean;\n ssrObserveBreakpoints?: string[];\n}\n\nexport const DEFAULT_CONFIG: LayoutConfigOptions = {\n addFlexToParent: true,\n addOrientationBps: false,\n disableDefaultBps: false,\n disableVendorPrefixes: false,\n serverLoaded: false,\n useColumnBasisZero: true,\n printWithBreakpoints: [],\n mediaTriggerAutoRestore: true,\n ssrObserveBreakpoints: [],\n};\n\nexport const LAYOUT_CONFIG = new InjectionToken<LayoutConfigOptions>(\n 'Flex Layout token, config options for the library', {\n providedIn: 'root',\n factory: () => DEFAULT_CONFIG\n });\n","/**\n * @license\n * Copyright Google LLC 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 {Injectable} from '@angular/core';\n\n/**\n * Utility to emulate a CSS stylesheet\n *\n * This utility class stores all of the styles for a given HTML element\n * as a readonly `stylesheet` map.\n */\n@Injectable({providedIn: 'root'})\nexport class StylesheetMap {\n\n readonly stylesheet = new Map<HTMLElement, Map<string, string|number>>();\n\n /**\n * Add an individual style to an HTML element\n */\n addStyleToElement(element: HTMLElement, style: string, value: string|number) {\n const stylesheet = this.stylesheet.get(element);\n if (stylesheet) {\n stylesheet.set(style, value);\n } else {\n this.stylesheet.set(element, new Map([[style, value]]));\n }\n }\n\n /**\n * Clear the virtual stylesheet\n */\n clearStyles() {\n this.stylesheet.clear();\n }\n\n /**\n * Retrieve a given style for an HTML element\n */\n getStyleForElement(el: HTMLElement, styleName: string): string {\n const styles = this.stylesheet.get(el);\n let value = '';\n if (styles) {\n const style = styles.get(styleName);\n if (typeof style === 'number' || typeof style === 'string') {\n value = style + '';\n }\n }\n return value;\n }\n}\n","/**\n * @license\n * Copyright Google LLC 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 */\nexport type MediaQuerySubscriber = (changes: MediaChange) => void;\n\n/**\n * Class instances emitted [to observers] for each mql notification\n */\nexport class MediaChange {\n property: string = '';\n value: any;\n\n /**\n * @param matches whether the mediaQuery is currently activated\n * @param mediaQuery e.g. (min-width: 600px) and (max-width: 959px)\n * @param mqAlias e.g. gt-sm, md, gt-lg\n * @param suffix e.g. GtSM, Md, GtLg\n * @param priority the priority of activation for the given breakpoint\n */\n constructor(public matches = false,\n public mediaQuery = 'all',\n public mqAlias = '',\n public suffix = '',\n public priority = 0) {\n }\n\n /** Create an exact copy of the MediaChange */\n clone(): MediaChange {\n return new MediaChange(this.matches, this.mediaQuery, this.mqAlias, this.suffix);\n }\n}\n\n\n","/**\n * @license\n * Copyright Google LLC 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';\n\nimport {BROWSER_PROVIDER} from './browser-provider';\n\n/**\n * *****************************************************************\n * Define module for the MediaQuery API\n * *****************************************************************\n */\n\n@NgModule({\n providers: [BROWSER_PROVIDER]\n})\nexport class CoreModule {\n}\n","/**\n * @license\n * Copyright Google LLC 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 {APP_BOOTSTRAP_LISTENER, PLATFORM_ID, InjectionToken} from '@angular/core';\nimport {DOCUMENT, isPlatformBrowser} from '@angular/common';\n\n/**\n * Find all of the server-generated stylings, if any, and remove them\n * This will be in the form of inline classes and the style block in the\n * head of the DOM\n */\nexport function removeStyles(_document: Document, platformId: Object) {\n return () => {\n if (isPlatformBrowser(platformId)) {\n const elements = Array.from(_document.querySelectorAll(`[class*=${CLASS_NAME}]`));\n\n // RegExp constructor should only be used if passing a variable to the constructor.\n // When using static regular expression it is more performant to use reg exp literal.\n // This is also needed to provide Safari 9 compatibility, please see\n // https://stackoverflow.com/questions/37919802 for more discussion.\n const classRegex = /\\bflex-layout-.+?\\b/g;\n elements.forEach(el => {\n el.classList.contains(`${CLASS_NAME}ssr`) && el.parentNode ?\n el.parentNode.removeChild(el) : el.className.replace(classRegex, '');\n });\n }\n };\n}\n\n/**\n * Provider to remove SSR styles on the browser\n */\nexport const BROWSER_PROVIDER = {\n provide: <InjectionToken<(() => void)[]>>APP_BOOTSTRAP_LISTENER,\n useFactory: removeStyles,\n deps: [DOCUMENT, PLATFORM_ID],\n multi: true\n};\n\nexport const CLASS_NAME = 'flex-layout-';\n"],"names":["map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;A2BeA,AAAA,SAAgB,YAAY,CAAC,SAAmB,EAAE,UAAkB,EAApE;IACE;;;IAAO,MAAT;QACI,IAAI,iBAAiB,CAAC,UAAU,CAAC,EAAE;;YACvC,MAAY,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,gBAAgB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