blob: c89d31964bbbcdc76b718fc36a89eeb875896fdc [file] [log] [blame]
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("rxjs"),require("@angular/cdk/keycodes"),require("rxjs/operators"),require("@angular/cdk/coercion"),require("@angular/cdk/platform"),require("@angular/cdk/observers")):"function"==typeof define&&define.amd?define("@angular/cdk/a11y",["exports","@angular/common","@angular/core","rxjs","@angular/cdk/keycodes","rxjs/operators","@angular/cdk/coercion","@angular/cdk/platform","@angular/cdk/observers"],t):t(((e=e||self).ng=e.ng||{},e.ng.cdk=e.ng.cdk||{},e.ng.cdk.a11y={}),e.ng.common,e.ng.core,e.rxjs,e.ng.cdk.keycodes,e.rxjs.operators,e.ng.cdk.coercion,e.ng.cdk.platform,e.ng.cdk.observers)}(this,(function(e,t,n,r,o,i,s,c,a){"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
*/function u(e,t){return(e.getAttribute(t)||"").match(/\S+/g)||[]}
/**
* @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 d=0,h=new Map,l=null,p=function(){function e(e){this._document=e}return e.prototype.describe=function(e,t,n){if(this._canBeDescribed(e,t)){var r=f(t,n);"string"!=typeof t?(_(t),h.set(r,{messageElement:t,referenceCount:0})):h.has(r)||this._createMessageElement(t,n),this._isElementDescribedByMessage(e,r)||this._addMessageReference(e,r)}},e.prototype.removeDescription=function(e,t,n){if(t&&this._isElementNode(e)){var r=f(t,n);if(this._isElementDescribedByMessage(e,r)&&this._removeMessageReference(e,r),"string"==typeof t){var o=h.get(r);o&&0===o.referenceCount&&this._deleteMessageElement(r)}l&&0===l.childNodes.length&&this._deleteMessagesContainer()}},e.prototype.ngOnDestroy=function(){for(var e=this._document.querySelectorAll("[cdk-describedby-host]"),t=0;t<e.length;t++)this._removeCdkDescribedByReferenceIds(e[t]),e[t].removeAttribute("cdk-describedby-host");l&&this._deleteMessagesContainer(),h.clear()},e.prototype._createMessageElement=function(e,t){var n=this._document.createElement("div");_(n),n.textContent=e,t&&n.setAttribute("role",t),this._createMessagesContainer(),l.appendChild(n),h.set(f(e,t),{messageElement:n,referenceCount:0})},e.prototype._deleteMessageElement=function(e){var t=h.get(e),n=t&&t.messageElement;l&&n&&l.removeChild(n),h.delete(e)},e.prototype._createMessagesContainer=function(){if(!l){var e=this._document.getElementById("cdk-describedby-message-container");e&&e.parentNode&&e.parentNode.removeChild(e),(l=this._document.createElement("div")).id="cdk-describedby-message-container",l.style.visibility="hidden",l.classList.add("cdk-visually-hidden"),this._document.body.appendChild(l)}},e.prototype._deleteMessagesContainer=function(){l&&l.parentNode&&(l.parentNode.removeChild(l),l=null)},e.prototype._removeCdkDescribedByReferenceIds=function(e){var t=u(e,"aria-describedby").filter((function(e){return 0!=e.indexOf("cdk-describedby-message")}));e.setAttribute("aria-describedby",t.join(" "))},e.prototype._addMessageReference=function(e,t){var n=h.get(t);!function r(e,t,n){var r=u(e,t);r.some((function(e){return e.trim()==n.trim()}))||(r.push(n.trim()),e.setAttribute(t,r.join(" ")))}(e,"aria-describedby",n.messageElement.id),e.setAttribute("cdk-describedby-host",""),n.referenceCount++},e.prototype._removeMessageReference=function(e,t){var n=h.get(t);n.referenceCount--,function r(e,t,n){var r=u(e,t).filter((function(e){return e!=n.trim()}));r.length?e.setAttribute(t,r.join(" ")):e.removeAttribute(t)}(e,"aria-describedby",n.messageElement.id),e.removeAttribute("cdk-describedby-host")},e.prototype._isElementDescribedByMessage=function(e,t){var n=u(e,"aria-describedby"),r=h.get(t),o=r&&r.messageElement.id;return!!o&&-1!=n.indexOf(o)},e.prototype._canBeDescribed=function(e,t){if(!this._isElementNode(e))return!1;if(t&&"object"==typeof t)return!0;var n=null==t?"":(""+t).trim(),r=e.getAttribute("aria-label");return!(!n||r&&r.trim()===n)},e.prototype._isElementNode=function(e){return e.nodeType===this._document.ELEMENT_NODE},e}();function f(e,t){return"string"==typeof e?(t||"")+"/"+e:e}function _(e){e.id||(e.id="cdk-describedby-message-"+d++)}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */pprov=n.ɵɵdefineInjectable({factory:function e(){return new p(n.ɵɵinject(t.DOCUMENT))},token:p,providedIn:"root"}),p.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],p.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[t.DOCUMENT]}]}]};var m=function(e,t){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}
/**
* @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 b=function(){function e(e){var t=this;this._items=e,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new r.Subject,this._typeaheadSubscription=r.Subscription.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._skipPredicateFn=function(e){return e.disabled},this._pressedLetters=[],this.tabOut=new r.Subject,this.change=new r.Subject,e instanceof n.QueryList&&e.changes.subscribe((function(e){if(t._activeItem){var n=e.toArray().indexOf(t._activeItem);n>-1&&n!==t._activeItemIndex&&(t._activeItemIndex=n)}}))}return e.prototype.skipPredicate=function(e){return this._skipPredicateFn=e,this},e.prototype.withWrap=function(e){return void 0===e&&(e=!0),this._wrap=e,this},e.prototype.withVerticalOrientation=function(e){return void 0===e&&(e=!0),this._vertical=e,this},e.prototype.withHorizontalOrientation=function(e){return this._horizontal=e,this},e.prototype.withAllowedModifierKeys=function(e){return this._allowedModifierKeys=e,this},e.prototype.withTypeAhead=function(e){var t=this;return void 0===e&&(e=200),this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(i.tap((function(e){return t._pressedLetters.push(e)})),i.debounceTime(e),i.filter((function(){return t._pressedLetters.length>0})),i.map((function(){return t._pressedLetters.join("")}))).subscribe((function(e){for(var n=t._getItemsArray(),r=1;r<n.length+1;r++){var o=(t._activeItemIndex+r)%n.length,i=n[o];if(!t._skipPredicateFn(i)&&0===i.getLabel().toUpperCase().trim().indexOf(e)){t.setActiveItem(o);break}}t._pressedLetters=[]})),this},e.prototype.withHomeAndEnd=function(e){return void 0===e&&(e=!0),this._homeAndEnd=e,this},e.prototype.setActiveItem=function(e){var t=this._activeItem;this.updateActiveItem(e),this._activeItem!==t&&this.change.next(this._activeItemIndex)},e.prototype.onKeydown=function(e){var t=this,n=e.keyCode,r=["altKey","ctrlKey","metaKey","shiftKey"].every((function(n){return!e[n]||t._allowedModifierKeys.indexOf(n)>-1}));switch(n){case o.TAB:return void this.tabOut.next();case o.DOWN_ARROW:if(this._vertical&&r){this.setNextItemActive();break}return;case o.UP_ARROW:if(this._vertical&&r){this.setPreviousItemActive();break}return;case o.RIGHT_ARROW:if(this._horizontal&&r){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case o.LEFT_ARROW:if(this._horizontal&&r){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case o.HOME:if(this._homeAndEnd&&r){this.setFirstItemActive();break}return;case o.END:if(this._homeAndEnd&&r){this.setLastItemActive();break}return;default:return void((r||o.hasModifierKey(e,"shiftKey"))&&(e.key&&1===e.key.length?this._letterKeyStream.next(e.key.toLocaleUpperCase()):(n>=o.A&&n<=o.Z||n>=o.ZERO&&n<=o.NINE)&&this._letterKeyStream.next(String.fromCharCode(n))))}this._pressedLetters=[],e.preventDefault()},Object.defineProperty(e.prototype,"activeItemIndex",{get:function(){return this._activeItemIndex},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeItem",{get:function(){return this._activeItem},enumerable:!1,configurable:!0}),e.prototype.isTyping=function(){return this._pressedLetters.length>0},e.prototype.setFirstItemActive=function(){this._setActiveItemByIndex(0,1)},e.prototype.setLastItemActive=function(){this._setActiveItemByIndex(this._items.length-1,-1)},e.prototype.setNextItemActive=function(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)},e.prototype.setPreviousItemActive=function(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)},e.prototype.updateActiveItem=function(e){var t=this._getItemsArray(),n="number"==typeof e?e:t.indexOf(e),r=t[n];this._activeItem=null==r?null:r,this._activeItemIndex=n},e.prototype._setActiveItemByDelta=function(e){this._wrap?this._setActiveInWrapMode(e):this._setActiveInDefaultMode(e)},e.prototype._setActiveInWrapMode=function(e){for(var t=this._getItemsArray(),n=1;n<=t.length;n++){var r=(this._activeItemIndex+e*n+t.length)%t.length;if(!this._skipPredicateFn(t[r]))return void this.setActiveItem(r)}},e.prototype._setActiveInDefaultMode=function(e){this._setActiveItemByIndex(this._activeItemIndex+e,e)},e.prototype._setActiveItemByIndex=function(e,t){var n=this._getItemsArray();if(n[e]){for(;this._skipPredicateFn(n[e]);)if(!n[e+=t])return;this.setActiveItem(e)}},e.prototype._getItemsArray=function(){return this._items instanceof n.QueryList?this._items.toArray():this._items},e}(),I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return y(t,e),t.prototype.setActiveItem=function(t){this.activeItem&&this.activeItem.setInactiveStyles(),e.prototype.setActiveItem.call(this,t),this.activeItem&&this.activeItem.setActiveStyles()},t}(b),E=function(e){function t(){var t=e.apply(this,g(arguments))||this;return t._origin="program",t}return y(t,e),t.prototype.setFocusOrigin=function(e){return this._origin=e,this},t.prototype.setActiveItem=function(t){e.prototype.setActiveItem.call(this,t),this.activeItem&&this.activeItem.focus(this._origin)},t}(b),A=function A(){this.ignoreVisibility=!1},T=function(){function e(e){this._platform=e}return e.prototype.isDisabled=function(e){return e.hasAttribute("disabled")},e.prototype.isVisible=function(e){return function t(e){return!!(e.offsetWidth||e.offsetHeight||"function"==typeof e.getClientRects&&e.getClientRects().length)}(e)&&"visible"===getComputedStyle(e).visibility},e.prototype.isTabbable=function(e){if(!this._platform.isBrowser)return!1;var t=function r(e){try{return e.frameElement}catch(e){return null}}(function n(e){return e.ownerDocument&&e.ownerDocument.defaultView||window}
/**
* @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));if(t){if(-1===C(t))return!1;if(!this.isVisible(t))return!1}var o=e.nodeName.toLowerCase(),i=C(e);return e.hasAttribute("contenteditable")?-1!==i:"iframe"!==o&&"object"!==o&&!(this._platform.WEBKIT&&this._platform.IOS&&!function s(e){var t=e.nodeName.toLowerCase(),n="input"===t&&e.type;return"text"===n||"password"===n||"select"===t||"textarea"===t}(e))&&("audio"===o?!!e.hasAttribute("controls")&&-1!==i:"video"===o?-1!==i&&(null!==i||this._platform.FIREFOX||e.hasAttribute("controls")):e.tabIndex>=0)},e.prototype.isFocusable=function(e,t){return function n(e){return!function t(e){return function t(e){return"input"==e.nodeName.toLowerCase()}(e)&&"hidden"==e.type}(e)&&(function n(e){var t=e.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(e)||function r(e){return function t(e){return"a"==e.nodeName.toLowerCase()}(e)&&e.hasAttribute("href")}(e)||e.hasAttribute("contenteditable")||k(e))}(e)&&!this.isDisabled(e)&&((null==t?void 0:t.ignoreVisibility)||this.isVisible(e))},e}();function k(e){if(!e.hasAttribute("tabindex")||void 0===e.tabIndex)return!1;var t=e.getAttribute("tabindex");return"-32768"!=t&&!(!t||isNaN(parseInt(t,10)))}function C(e){if(!k(e))return null;var t=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}Tprov=n.ɵɵdefineInjectable({factory:function e(){return new T(n.ɵɵinject(c.Platform))},token:T,providedIn:"root"}),T.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],T.ctorParameters=function(){return[{type:c.Platform}]};var w=function(){function e(e,t,n,r,o){var i=this;void 0===o&&(o=!1),this._element=e,this._checker=t,this._ngZone=n,this._document=r,this._hasAttached=!1,this.startAnchorListener=function(){return i.focusLastTabbableElement()},this.endAnchorListener=function(){return i.focusFirstTabbableElement()},this._enabled=!0,o||this.attachAnchors()}return Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){var e=this._startAnchor,t=this._endAnchor;e&&(e.removeEventListener("focus",this.startAnchorListener),e.parentNode&&e.parentNode.removeChild(e)),t&&(t.removeEventListener("focus",this.endAnchorListener),t.parentNode&&t.parentNode.removeChild(t)),this._startAnchor=this._endAnchor=null,this._hasAttached=!1},e.prototype.attachAnchors=function(){var e=this;return!!this._hasAttached||(this._ngZone.runOutsideAngular((function(){e._startAnchor||(e._startAnchor=e._createAnchor(),e._startAnchor.addEventListener("focus",e.startAnchorListener)),e._endAnchor||(e._endAnchor=e._createAnchor(),e._endAnchor.addEventListener("focus",e.endAnchorListener))})),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)},e.prototype.focusInitialElementWhenReady=function(){var e=this;return new Promise((function(t){e._executeOnStable((function(){return t(e.focusInitialElement())}))}))},e.prototype.focusFirstTabbableElementWhenReady=function(){var e=this;return new Promise((function(t){e._executeOnStable((function(){return t(e.focusFirstTabbableElement())}))}))},e.prototype.focusLastTabbableElementWhenReady=function(){var e=this;return new Promise((function(t){e._executeOnStable((function(){return t(e.focusLastTabbableElement())}))}))},e.prototype._getRegionBoundary=function(e){for(var t=this._element.querySelectorAll("[cdk-focus-region-"+e+"], [cdkFocusRegion"+e+"], [cdk-focus-"+e+"]"),n=0;n<t.length;n++)t[n].hasAttribute("cdk-focus-"+e)?console.warn("Found use of deprecated attribute 'cdk-focus-"+e+"', use 'cdkFocusRegion"+e+"' instead. The deprecated attribute will be removed in 8.0.0.",t[n]):t[n].hasAttribute("cdk-focus-region-"+e)&&console.warn("Found use of deprecated attribute 'cdk-focus-region-"+e+"', use 'cdkFocusRegion"+e+"' instead. The deprecated attribute will be removed in 8.0.0.",t[n]);return"start"==e?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)},e.prototype.focusInitialElement=function(){var e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(e.hasAttribute("cdk-focus-initial")&&console.warn("Found use of deprecated attribute 'cdk-focus-initial', use 'cdkFocusInitial' instead. The deprecated attribute will be removed in 8.0.0",e),!this._checker.isFocusable(e)){var t=this._getFirstTabbableElement(e);return null==t||t.focus(),!!t}return e.focus(),!0}return this.focusFirstTabbableElement()},e.prototype.focusFirstTabbableElement=function(){var e=this._getRegionBoundary("start");return e&&e.focus(),!!e},e.prototype.focusLastTabbableElement=function(){var e=this._getRegionBoundary("end");return e&&e.focus(),!!e},e.prototype.hasAttached=function(){return this._hasAttached},e.prototype._getFirstTabbableElement=function(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;for(var t=e.children||e.childNodes,n=0;n<t.length;n++){var r=t[n].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(t[n]):null;if(r)return r}return null},e.prototype._getLastTabbableElement=function(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;for(var t=e.children||e.childNodes,n=t.length-1;n>=0;n--){var r=t[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[n]):null;if(r)return r}return null},e.prototype._createAnchor=function(){var e=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,e),e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e.setAttribute("aria-hidden","true"),e},e.prototype._toggleAnchorTabIndex=function(e,t){e?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")},e.prototype.toggleAnchors=function(e){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))},e.prototype._executeOnStable=function(e){this._ngZone.isStable?e():this._ngZone.onStable.pipe(i.take(1)).subscribe(e)},e}(),F=function(){function e(e,t,n){this._checker=e,this._ngZone=t,this._document=n}return e.prototype.create=function(e,t){return void 0===t&&(t=!1),new w(e,this._checker,this._ngZone,this._document,t)},e}();Fprov=n.ɵɵdefineInjectable({factory:function e(){return new F(n.ɵɵinject(T),n.ɵɵinject(n.NgZone),n.ɵɵinject(t.DOCUMENT))},token:F,providedIn:"root"}),F.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],F.ctorParameters=function(){return[{type:T},{type:n.NgZone},{type:void 0,decorators:[{type:n.Inject,args:[t.DOCUMENT]}]}]};var O=function(){function e(e,t,n){this._elementRef=e,this._focusTrapFactory=t,this._previouslyFocusedElement=null,this._document=n,this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0)}return Object.defineProperty(e.prototype,"enabled",{get:function(){return this.focusTrap.enabled},set:function(e){this.focusTrap.enabled=s.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"autoCapture",{get:function(){return this._autoCapture},set:function(e){this._autoCapture=s.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),e.prototype.ngOnDestroy=function(){this.focusTrap.destroy(),this._previouslyFocusedElement&&(this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null)},e.prototype.ngAfterContentInit=function(){this.focusTrap.attachAnchors(),this.autoCapture&&this._captureFocus()},e.prototype.ngDoCheck=function(){this.focusTrap.hasAttached()||this.focusTrap.attachAnchors()},e.prototype.ngOnChanges=function(e){var t=e.autoCapture;t&&!t.firstChange&&this.autoCapture&&this.focusTrap.hasAttached()&&this._captureFocus()},e.prototype._captureFocus=function(){var e,t,n=null===(e=this._document)||void 0===e?void 0:e.activeElement;this._previouslyFocusedElement=(null===(t=null==n?void 0:n.shadowRoot)||void 0===t?void 0:t.activeElement)||n,this.focusTrap.focusInitialElementWhenReady()},e}();O.decorators=[{type:n.Directive,args:[{selector:"[cdkTrapFocus]",exportAs:"cdkTrapFocus"}]}],O.ctorParameters=function(){return[{type:n.ElementRef},{type:F},{type:void 0,decorators:[{type:n.Inject,args:[t.DOCUMENT]}]}]},O.propDecorators={enabled:[{type:n.Input,args:["cdkTrapFocus"]}],autoCapture:[{type:n.Input,args:["cdkTrapFocusAutoCapture"]}]};var N=function(e){function t(t,n,r,o,i,s,c){var a=e.call(this,t,n,r,o,c.defer)||this;return a._focusTrapManager=i,a._inertStrategy=s,a._focusTrapManager.register(a),a}return y(t,e),Object.defineProperty(t.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled=e,this._enabled?this._focusTrapManager.register(this):this._focusTrapManager.deregister(this)},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){this._focusTrapManager.deregister(this),e.prototype.destroy.call(this)},t.prototype._enable=function(){this._inertStrategy.preventFocus(this),this.toggleAnchors(!0)},t.prototype._disable=function(){this._inertStrategy.allowFocus(this),this.toggleAnchors(!1)},t}(w),L="undefined"!=typeof Element&&!!Element.prototype.closest;
/**
* @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 M(e,t){return e.matches?e.matches(t):e.msMatchesSelector(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
*/var j=function(){function e(){this._listener=null}return e.prototype.preventFocus=function(e){var t=this;this._listener&&e._document.removeEventListener("focus",this._listener,!0),this._listener=function(n){return t._trapFocus(e,n)},e._ngZone.runOutsideAngular((function(){e._document.addEventListener("focus",t._listener,!0)}))},e.prototype.allowFocus=function(e){this._listener&&(e._document.removeEventListener("focus",this._listener,!0),this._listener=null)},e.prototype._trapFocus=function(e,t){var n=t.target,r=e._element;r.contains(n)||null!==function o(e,t){if(!(e instanceof Node))return null;for(var n=e;null!=n&&!(n instanceof Element);)n=n.parentNode;return n&&(L?n.closest(t):function r(e,t){for(var n=e;null!=n&&!(n instanceof Element&&M(n,t));)n=n.parentNode;return n||null}(n,t))}(n,"div.cdk-overlay-pane")||setTimeout((function(){e.enabled&&!r.contains(e._document.activeElement)&&e.focusFirstTabbableElement()}))},e}(),x=function x(){this.defer=!1},D=new n.InjectionToken("FOCUS_TRAP_INERT_STRATEGY"),S=function(){function e(){this._focusTrapStack=[]}return e.prototype.register=function(e){this._focusTrapStack=this._focusTrapStack.filter((function(t){return t!==e}));var t=this._focusTrapStack;t.length&&t[t.length-1]._disable(),t.push(e),e._enable()},e.prototype.deregister=function(e){e._disable();var t=this._focusTrapStack,n=t.indexOf(e);-1!==n&&(t.splice(n,1),t.length&&t[t.length-1]._enable())},e}();
/**
* @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
*/Sprov=n.ɵɵdefineInjectable({factory:function e(){return new S},token:S,providedIn:"root"}),S.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}];
/**
* @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 R=function(){function e(e,t,n,r,o){this._checker=e,this._ngZone=t,this._focusTrapManager=n,this._document=r,this._inertStrategy=o||new j}return e.prototype.create=function(e,t){var n;return void 0===t&&(t=new x),"boolean"==typeof t?(n=new x).defer=t:n=t,new N(e,this._checker,this._ngZone,this._document,this._focusTrapManager,this._inertStrategy,n)},e}();Rprov=n.ɵɵdefineInjectable({factory:function e(){return new R(n.ɵɵinject(T),n.ɵɵinject(n.NgZone),n.ɵɵinject(S),n.ɵɵinject(t.DOCUMENT),n.ɵɵinject(D,8))},token:R,providedIn:"root"}),R.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],R.ctorParameters=function(){return[{type:T},{type:n.NgZone},{type:S},{type:void 0,decorators:[{type:n.Inject,args:[t.DOCUMENT]}]},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[D]}]}]};
/**
* @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=new n.InjectionToken("liveAnnouncerElement",{providedIn:"root",factory:B});function B(){return null}var U=new n.InjectionToken("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),Z=function(){function e(e,t,n,r){this._ngZone=t,this._defaultOptions=r,this._document=n,this._liveElement=e||this._createLiveElement()}return e.prototype.announce=function(e){for(var t,n=this,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];var i,s,c=this._defaultOptions;return 1===r.length&&"number"==typeof r[0]?s=r[0]:(i=(t=v(r,2))[0],s=t[1]),this.clear(),clearTimeout(this._previousTimeout),i||(i=c&&c.politeness?c.politeness:"polite"),null==s&&c&&(s=c.duration),this._liveElement.setAttribute("aria-live",i),this._ngZone.runOutsideAngular((function(){return new Promise((function(t){clearTimeout(n._previousTimeout),n._previousTimeout=setTimeout((function(){n._liveElement.textContent=e,t(),"number"==typeof s&&(n._previousTimeout=setTimeout((function(){return n.clear()}),s))}),100)}))}))},e.prototype.clear=function(){this._liveElement&&(this._liveElement.textContent="")},e.prototype.ngOnDestroy=function(){clearTimeout(this._previousTimeout),this._liveElement&&this._liveElement.parentNode&&(this._liveElement.parentNode.removeChild(this._liveElement),this._liveElement=null)},e.prototype._createLiveElement=function(){for(var e=this._document.getElementsByClassName("cdk-live-announcer-element"),t=this._document.createElement("div"),n=0;n<e.length;n++)e[n].parentNode.removeChild(e[n]);return t.classList.add("cdk-live-announcer-element"),t.classList.add("cdk-visually-hidden"),t.setAttribute("aria-atomic","true"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),t},e}();Zprov=n.ɵɵdefineInjectable({factory:function e(){return new Z(n.ɵɵinject(P,8),n.ɵɵinject(n.NgZone),n.ɵɵinject(t.DOCUMENT),n.ɵɵinject(U,8))},token:Z,providedIn:"root"}),Z.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],Z.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[P]}]},{type:n.NgZone},{type:void 0,decorators:[{type:n.Inject,args:[t.DOCUMENT]}]},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[U]}]}]};var K=function(){function e(e,t,n,r){this._elementRef=e,this._liveAnnouncer=t,this._contentObserver=n,this._ngZone=r,this._politeness="polite"}return Object.defineProperty(e.prototype,"politeness",{get:function(){return this._politeness},set:function(e){var t=this;this._politeness="off"===e||"assertive"===e?e:"polite","off"===this._politeness?this._subscription&&(this._subscription.unsubscribe(),this._subscription=null):this._subscription||(this._subscription=this._ngZone.runOutsideAngular((function(){return t._contentObserver.observe(t._elementRef).subscribe((function(){var e=t._elementRef.nativeElement.textContent;e!==t._previousAnnouncedText&&(t._liveAnnouncer.announce(e,t._politeness),t._previousAnnouncedText=e)}))})))},enumerable:!1,configurable:!0}),e.prototype.ngOnDestroy=function(){this._subscription&&this._subscription.unsubscribe()},e}();
/**
* @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(e){return 0===e.buttons}function V(e){var t=e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0];return!(!t||-1!==t.identifier||null!=t.radiusX&&1!==t.radiusX||null!=t.radiusY&&1!==t.radiusY)}K.decorators=[{type:n.Directive,args:[{selector:"[cdkAriaLive]",exportAs:"cdkAriaLive"}]}],K.ctorParameters=function(){return[{type:n.ElementRef},{type:Z},{type:a.ContentObserver},{type:n.NgZone}]},K.propDecorators={politeness:[{type:n.Input,args:["cdkAriaLive"]}]};var H=new n.InjectionToken("cdk-focus-monitor-default-options"),q=c.normalizePassiveListenerOptions({passive:!0,capture:!0}),G=function(){function e(e,t,n,r){var o=this;this._ngZone=e,this._platform=t,this._origin=null,this._windowFocused=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._documentKeydownListener=function(){o._lastTouchTarget=null,o._setOriginForCurrentEventQueue("keyboard")},this._documentMousedownListener=function(e){if(!o._lastTouchTarget){var t=W(e)?"keyboard":"mouse";o._setOriginForCurrentEventQueue(t)}},this._documentTouchstartListener=function(e){V(e)?o._lastTouchTarget||o._setOriginForCurrentEventQueue("keyboard"):(null!=o._touchTimeoutId&&clearTimeout(o._touchTimeoutId),o._lastTouchTarget=Y(e),o._touchTimeoutId=setTimeout((function(){return o._lastTouchTarget=null}),650))},this._windowFocusListener=function(){o._windowFocused=!0,o._windowFocusTimeoutId=setTimeout((function(){return o._windowFocused=!1}))},this._rootNodeFocusAndBlurListener=function(e){for(var t=Y(e),n="focus"===e.type?o._onFocus:o._onBlur,r=t;r;r=r.parentElement)n.call(o,e,r)},this._document=n,this._detectionMode=(null==r?void 0:r.detectionMode)||0}return e.prototype.monitor=function(e,t){void 0===t&&(t=!1);var n=s.coerceElement(e);if(!this._platform.isBrowser||1!==n.nodeType)return r.of(null);var o=c._getShadowRoot(n)||this._getDocument(),i=this._elementInfo.get(n);if(i)return t&&(i.checkChildren=!0),i.subject;var a={checkChildren:t,subject:new r.Subject,rootNode:o};return this._elementInfo.set(n,a),this._registerGlobalListeners(a),a.subject},e.prototype.stopMonitoring=function(e){var t=s.coerceElement(e),n=this._elementInfo.get(t);n&&(n.subject.complete(),this._setClasses(t),this._elementInfo.delete(t),this._removeGlobalListeners(n))},e.prototype.focusVia=function(e,t,n){var r=this,o=s.coerceElement(e);o===this._getDocument().activeElement?this._getClosestElementsInfo(o).forEach((function(e){var n=v(e,2);return r._originChanged(n[0],t,n[1])})):(this._setOriginForCurrentEventQueue(t),"function"==typeof o.focus&&o.focus(n))},e.prototype.ngOnDestroy=function(){var e=this;this._elementInfo.forEach((function(t,n){return e.stopMonitoring(n)}))},e.prototype._getDocument=function(){return this._document||document},e.prototype._getWindow=function(){return this._getDocument().defaultView||window},e.prototype._toggleClass=function(e,t,n){n?e.classList.add(t):e.classList.remove(t)},e.prototype._getFocusOrigin=function(e){return this._origin?this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:this._wasCausedByTouch(e)?"touch":"program"},e.prototype._setClasses=function(e,t){this._toggleClass(e,"cdk-focused",!!t),this._toggleClass(e,"cdk-touch-focused","touch"===t),this._toggleClass(e,"cdk-keyboard-focused","keyboard"===t),this._toggleClass(e,"cdk-mouse-focused","mouse"===t),this._toggleClass(e,"cdk-program-focused","program"===t)},e.prototype._setOriginForCurrentEventQueue=function(e){var t=this;this._ngZone.runOutsideAngular((function(){t._origin=e,0===t._detectionMode&&(t._originTimeoutId=setTimeout((function(){return t._origin=null}),1))}))},e.prototype._wasCausedByTouch=function(e){var t=Y(e);return this._lastTouchTarget instanceof Node&&t instanceof Node&&(t===this._lastTouchTarget||t.contains(this._lastTouchTarget))},e.prototype._onFocus=function(e,t){var n=this._elementInfo.get(t);n&&(n.checkChildren||t===Y(e))&&this._originChanged(t,this._getFocusOrigin(e),n)},e.prototype._onBlur=function(e,t){var n=this._elementInfo.get(t);!n||n.checkChildren&&e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||(this._setClasses(t),this._emitOrigin(n.subject,null))},e.prototype._emitOrigin=function(e,t){this._ngZone.run((function(){return e.next(t)}))},e.prototype._registerGlobalListeners=function(e){var t=this;if(this._platform.isBrowser){var n=e.rootNode,r=this._rootNodeFocusListenerCount.get(n)||0;r||this._ngZone.runOutsideAngular((function(){n.addEventListener("focus",t._rootNodeFocusAndBlurListener,q),n.addEventListener("blur",t._rootNodeFocusAndBlurListener,q)})),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&this._ngZone.runOutsideAngular((function(){var e=t._getDocument(),n=t._getWindow();e.addEventListener("keydown",t._documentKeydownListener,q),e.addEventListener("mousedown",t._documentMousedownListener,q),e.addEventListener("touchstart",t._documentTouchstartListener,q),n.addEventListener("focus",t._windowFocusListener)}))}},e.prototype._removeGlobalListeners=function(e){var t=e.rootNode;if(this._rootNodeFocusListenerCount.has(t)){var n=this._rootNodeFocusListenerCount.get(t);n>1?this._rootNodeFocusListenerCount.set(t,n-1):(t.removeEventListener("focus",this._rootNodeFocusAndBlurListener,q),t.removeEventListener("blur",this._rootNodeFocusAndBlurListener,q),this._rootNodeFocusListenerCount.delete(t))}if(!--this._monitoredElementCount){var r=this._getDocument(),o=this._getWindow();r.removeEventListener("keydown",this._documentKeydownListener,q),r.removeEventListener("mousedown",this._documentMousedownListener,q),r.removeEventListener("touchstart",this._documentTouchstartListener,q),o.removeEventListener("focus",this._windowFocusListener),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._touchTimeoutId),clearTimeout(this._originTimeoutId)}},e.prototype._originChanged=function(e,t,n){this._setClasses(e,t),this._emitOrigin(n.subject,t),this._lastFocusOrigin=t},e.prototype._getClosestElementsInfo=function(e){var t=[];return this._elementInfo.forEach((function(n,r){(r===e||n.checkChildren&&r.contains(e))&&t.push([r,n])})),t},e}();function Y(e){return e.composedPath?e.composedPath()[0]:e.target}Gprov=n.ɵɵdefineInjectable({factory:function e(){return new G(n.ɵɵinject(n.NgZone),n.ɵɵinject(c.Platform),n.ɵɵinject(t.DOCUMENT,8),n.ɵɵinject(H,8))},token:G,providedIn:"root"}),G.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],G.ctorParameters=function(){return[{type:n.NgZone},{type:c.Platform},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[t.DOCUMENT]}]},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[H]}]}]};var z=function(){function e(e,t){this._elementRef=e,this._focusMonitor=t,this.cdkFocusChange=new n.EventEmitter}return e.prototype.ngAfterViewInit=function(){var e=this,t=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(t,1===t.nodeType&&t.hasAttribute("cdkMonitorSubtreeFocus")).subscribe((function(t){return e.cdkFocusChange.emit(t)}))},e.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()},e}();z.decorators=[{type:n.Directive,args:[{selector:"[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]"}]}],z.ctorParameters=function(){return[{type:n.ElementRef},{type:G}]},z.propDecorators={cdkFocusChange:[{type:n.Output}]};
/**
* @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 Q,X=function(){function e(e,t){this._platform=e,this._document=t}return e.prototype.getHighContrastMode=function(){if(!this._platform.isBrowser)return 0;var e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);var t=this._document.defaultView||window,n=t&&t.getComputedStyle?t.getComputedStyle(e):null,r=(n&&n.backgroundColor||"").replace(/ /g,"");switch(this._document.body.removeChild(e),r){case"rgb(0,0,0)":return 2;case"rgb(255,255,255)":return 1}return 0},e.prototype._applyBodyHighContrastModeCssClasses=function(){if(this._platform.isBrowser&&this._document.body){var e=this._document.body.classList;e.remove("cdk-high-contrast-active"),e.remove("cdk-high-contrast-black-on-white"),e.remove("cdk-high-contrast-white-on-black");var t=this.getHighContrastMode();1===t?(e.add("cdk-high-contrast-active"),e.add("cdk-high-contrast-black-on-white")):2===t&&(e.add("cdk-high-contrast-active"),e.add("cdk-high-contrast-white-on-black"))}},e}();Xprov=n.ɵɵdefineInjectable({factory:function e(){return new X(n.ɵɵinject(c.Platform),n.ɵɵinject(t.DOCUMENT))},token:X,providedIn:"root"}),X.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],X.ctorParameters=function(){return[{type:c.Platform},{type:void 0,decorators:[{type:n.Inject,args:[t.DOCUMENT]}]}]},(Q=function Q(e){e._applyBodyHighContrastModeCssClasses()}).decorators=[{type:n.NgModule,args:[{imports:[c.PlatformModule,a.ObserversModule],declarations:[K,O,z],exports:[K,O,z]}]}],Q.ctorParameters=function(){return[{type:X}]},
/**
* @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.A11yModule=Q,e.ActiveDescendantKeyManager=I,e.AriaDescriber=p,e.CDK_DESCRIBEDBY_HOST_ATTRIBUTE="cdk-describedby-host",e.CDK_DESCRIBEDBY_ID_PREFIX="cdk-describedby-message",e.CdkAriaLive=K,e.CdkMonitorFocus=z,e.CdkTrapFocus=O,e.ConfigurableFocusTrap=N,e.ConfigurableFocusTrapFactory=R,e.EventListenerFocusTrapInertStrategy=j,e.FOCUS_MONITOR_DEFAULT_OPTIONS=H,e.FOCUS_TRAP_INERT_STRATEGY=D,e.FocusKeyManager=E,e.FocusMonitor=G,e.FocusTrap=w,e.FocusTrapFactory=F,e.HighContrastModeDetector=X,e.InteractivityChecker=T,e.IsFocusableConfig=A,e.LIVE_ANNOUNCER_DEFAULT_OPTIONS=U,e.LIVE_ANNOUNCER_ELEMENT_TOKEN=P,e.LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY=B,e.ListKeyManager=b,e.LiveAnnouncer=Z,e.MESSAGES_CONTAINER_ID="cdk-describedby-message-container",e.TOUCH_BUFFER_MS=650,e.isFakeMousedownFromScreenReader=W,e.isFakeTouchstartFromScreenReader=V,eangular_material_src_cdk_a11y_a11y_a=S,eangular_material_src_cdk_a11y_a11y_b=x,Object.defineProperty(e,"__esModule",{value:!0})}));