@material/menu
Advanced tools
Comparing version 0.39.0-0 to 0.39.0
/** | ||
* @license | ||
* Copyright 2018 Google Inc. All Rights Reserved. | ||
* Copyright 2018 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
@@ -17,0 +23,0 @@ |
/** | ||
* @license | ||
* Copyright 2018 Google Inc. All Rights Reserved. | ||
* Copyright 2018 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
@@ -17,0 +23,0 @@ |
/*! | ||
Material Components for the Web | ||
Copyright (c) 2018 Google Inc. | ||
License: Apache-2.0 | ||
License: MIT | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.menu=t():(e.mdc=e.mdc||{},e.mdc.menu=t())}(this,function(){return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=117)}({0:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this.adapter_=t}return o(e,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),o(e,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),e}();t.a=r},1:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=n(0),r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;i(this,e),this.root_=t;for(var o=arguments.length,r=Array(o>2?o-2:0),s=2;s<o;s++)r[s-2]=arguments[s];this.initialize.apply(this,r),this.foundation_=void 0===n?this.getDefaultFoundation():n,this.foundation_.init(),this.initialSyncWithDOM()}return r(e,null,[{key:"attachTo",value:function(t){return new e(t,new o.a)}}]),r(e,[{key:"initialize",value:function(){}},{key:"getDefaultFoundation",value:function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")}},{key:"initialSyncWithDOM",value:function(){}},{key:"destroy",value:function(){this.foundation_.destroy()}},{key:"listen",value:function(e,t){this.root_.addEventListener(e,t)}},{key:"unlisten",value:function(e,t){this.root_.removeEventListener(e,t)}},{key:"emit",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=void 0;"function"==typeof CustomEvent?i=new CustomEvent(e,{detail:t,bubbles:n}):(i=document.createEvent("CustomEvent"),i.initCustomEvent(e,n,!1,t)),this.root_.dispatchEvent(i)}}]),e}();t.a=s},117:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"MDCMenu",function(){return _});var s=n(1),a=n(118),u=n(62),c=n(46),l=n(27),f=n(45);n.d(t,"MDCMenuFoundation",function(){return a.a}),n.d(t,"AnchorMargin",function(){return l.a}),n.d(t,"Corner",function(){return c.Corner});var d=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),h=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var s=o.get;if(void 0!==s)return s.call(i)},_=function(e){function t(){var e;i(this,t);for(var n=arguments.length,r=Array(n),s=0;s<n;s++)r[s]=arguments[s];var a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(r)));return a.menuSurface_,a.list_,a.handleKeydown_,a.handleClick_,a.afterOpenedCallback_,a}return r(t,e),d(t,[{key:"initialize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return new c.MDCMenuSurface(e)},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return new f.MDCList(e)};this.menuSurface_=e(this.root_);var n=this.root_.querySelector(u.b.LIST_SELECTOR);n&&(this.list_=t(n),this.list_.wrapFocus=!0)}},{key:"initialSyncWithDOM",value:function(){var e=this;this.afterOpenedCallback_=function(){return e.handleAfterOpened_()},this.handleKeydown_=function(t){return e.foundation_.handleKeydown(t)},this.handleClick_=function(t){return e.foundation_.handleClick(t)},this.menuSurface_.listen(l.b.strings.OPENED_EVENT,this.afterOpenedCallback_),this.listen("keydown",this.handleKeydown_),this.listen("click",this.handleClick_)}},{key:"destroy",value:function(){this.list_&&this.list_.destroy(),this.menuSurface_.destroy(),this.menuSurface_.unlisten(l.b.strings.OPENED_EVENT,this.afterOpenedCallback_),this.unlisten("keydown",this.handleKeydown_),this.unlisten("click",this.handleClick_),h(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"setAnchorCorner",value:function(e){this.menuSurface_.setAnchorCorner(e)}},{key:"setAnchorMargin",value:function(e){this.menuSurface_.setAnchorMargin(e)}},{key:"getOptionByIndex",value:function(e){return e<this.items.length?this.items[e]:null}},{key:"setFixedPosition",value:function(e){this.menuSurface_.setFixedPosition(e)}},{key:"hoistMenuToBody",value:function(){this.menuSurface_.hoistMenuToBody()}},{key:"setIsHoisted",value:function(e){this.menuSurface_.setIsHoisted(e)}},{key:"setAbsolutePosition",value:function(e,t){this.menuSurface_.setAbsolutePosition(e,t)}},{key:"setAnchorElement",value:function(e){this.menuSurface_.anchorElement=e}},{key:"handleAfterOpened_",value:function(){var e=this.items;e.length>0&&e[0].focus()}},{key:"getDefaultFoundation",value:function(){var e=this;return new a.a({addClassToElementAtIndex:function(t,n){e.items[t].classList.add(n)},removeClassFromElementAtIndex:function(t,n){e.items[t].classList.remove(n)},addAttributeToElementAtIndex:function(t,n,i){e.items[t].setAttribute(n,i)},removeAttributeFromElementAtIndex:function(t,n){e.items[t].removeAttribute(n)},elementContainsClass:function(e,t){return e.classList.contains(t)},closeSurface:function(){return e.open=!1},getElementIndex:function(t){return e.items.indexOf(t)},getParentElement:function(e){return e.parentElement},getSelectedElementIndex:function(t){return e.items.indexOf(t.querySelector("."+u.a.MENU_SELECTED_LIST_ITEM))},notifySelected:function(t){return e.emit(u.b.SELECTED_EVENT,{index:t.index,item:e.items[t.index]})},getCheckboxAtIndex:function(t){return e.items[t].querySelector(u.b.CHECKBOX_SELECTOR)},toggleCheckbox:function(e){e.checked=!e.checked;var t=document.createEvent("Event");t.initEvent("change",!1,!0),e.dispatchEvent(t)}})}},{key:"open",get:function(){return this.menuSurface_.open},set:function(e){this.menuSurface_.open=e}},{key:"items",get:function(){return this.list_.listElements_}},{key:"quickOpen",set:function(e){this.menuSurface_.quickOpen=e}}],[{key:"attachTo",value:function(e){return new t(e)}}]),t}(s.a)},118:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}n.d(t,"a",function(){return h});var s=n(0),a=(n(119),n(62)),u=n(27),c=n(40),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),d=["input","button","textarea","select"],h=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l(t.defaultAdapter,e)));return n.closeAnimationEndTimerId_=0,n}return r(t,e),f(t,null,[{key:"cssClasses",get:function(){return a.a}},{key:"strings",get:function(){return a.b}},{key:"defaultAdapter",get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},elementContainsClass:function(){},closeSurface:function(){},getElementIndex:function(){},getParentElement:function(){},getSelectedElementIndex:function(){},notifySelected:function(){},getCheckboxAtIndex:function(){},toggleCheckbox:function(){}}}}]),f(t,[{key:"destroy",value:function(){this.closeAnimationEndTimerId_&&clearTimeout(this.closeAnimationEndTimerId_),this.adapter_.closeSurface()}},{key:"handleKeydown",value:function(e){var t=e.key,n=e.keyCode,i="Space"===t||32===n,o="Enter"===t||13===n,r="Tab"===t||9===n;i||o?this.handleAction_(e):r&&this.adapter_.closeSurface()}},{key:"handleClick",value:function(e){this.handleAction_(e)}},{key:"handleAction_",value:function(e){var t=this.getListItem_(e.target);t&&(this.handleSelection_(t),this.preventDefaultEvent_(e))}},{key:"handleSelection_",value:function(e){var t=this,n=this.adapter_.getElementIndex(e);if(!(n<0)){this.adapter_.notifySelected({index:n}),this.adapter_.closeSurface();var i=this.adapter_.getCheckboxAtIndex(n);i&&this.adapter_.toggleCheckbox(i),this.closeAnimationEndTimerId_=setTimeout(function(){var i=t.getSelectionGroup_(e);null!==i&&t.handleSelectionGroup_(i,n)},u.b.numbers.TRANSITION_CLOSE_DURATION)}}},{key:"handleSelectionGroup_",value:function(e,t){var n=this.adapter_.getSelectedElementIndex(e);n>=0&&(this.adapter_.removeAttributeFromElementAtIndex(n,a.b.ARIA_SELECTED_ATTR),this.adapter_.removeClassFromElementAtIndex(n,a.a.MENU_SELECTED_LIST_ITEM)),this.adapter_.addClassToElementAtIndex(t,a.a.MENU_SELECTED_LIST_ITEM),this.adapter_.addAttributeToElementAtIndex(t,a.b.ARIA_SELECTED_ATTR,"true")}},{key:"getSelectionGroup_",value:function(e){for(var t=this.adapter_.getParentElement(e),n=this.adapter_.elementContainsClass(t,a.a.MENU_SELECTION_GROUP);!n&&!this.adapter_.elementContainsClass(t,c.a.cssClasses.ROOT);)t=this.adapter_.getParentElement(e),n=this.adapter_.elementContainsClass(t,a.a.MENU_SELECTION_GROUP);return n?t:null}},{key:"getListItem_",value:function(e){for(var t=this.adapter_.elementContainsClass(e,c.a.cssClasses.LIST_ITEM_CLASS);!t;){if(!(e=this.adapter_.getParentElement(e)))return null;t=this.adapter_.elementContainsClass(e,c.a.cssClasses.LIST_ITEM_CLASS)}return e}},{key:"preventDefaultEvent_",value:function(e){var t=e.target,n=(""+t.tagName).toLowerCase();-1===d.indexOf(n)&&e.preventDefault()}}]),t}(s.a)},119:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(){function e(){i(this,e)}o(e,[{key:"addClassToElementAtIndex",value:function(e,t){}},{key:"removeClassFromElementAtIndex",value:function(e,t){}},{key:"addAttributeToElementAtIndex",value:function(e,t,n){}},{key:"removeAttributeFromElementAtIndex",value:function(e,t){}},{key:"elementContainsClass",value:function(e,t){}},{key:"closeSurface",value:function(){}},{key:"getElementIndex",value:function(e){}},{key:"getParentElement",value:function(e){}},{key:"getSelectedElementIndex",value:function(e){}},{key:"notifySelected",value:function(e){}},{key:"getCheckboxAtIndex",value:function(e){}},{key:"toggleCheckbox",value:function(e){}}])}()},22:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(){function e(){i(this,e)}o(e,[{key:"getListItemCount",value:function(){}},{key:"getFocusedElementIndex",value:function(){}},{key:"getListItemIndex",value:function(e){}},{key:"setAttributeForElementIndex",value:function(e,t,n){}},{key:"removeAttributeForElementIndex",value:function(e,t){}},{key:"addClassForElementIndex",value:function(e,t){}},{key:"removeClassForElementIndex",value:function(e,t){}},{key:"focusItemAtIndex",value:function(e){}},{key:"isElementFocusable",value:function(e){}},{key:"isListItem",value:function(e){}},{key:"setTabIndexForListItemChildren",value:function(e,t){}}])}()},23:function(e,t,n){"use strict";n.d(t,"b",function(){return o}),n.d(t,"a",function(){return i});/** | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.menu=t():(e.mdc=e.mdc||{},e.mdc.menu=t())}(this,function(){return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=115)}({0:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this.adapter_=t}return o(e,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),o(e,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),e}();t.a=r},1:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=n(0),r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;i(this,e),this.root_=t;for(var o=arguments.length,r=Array(o>2?o-2:0),s=2;s<o;s++)r[s-2]=arguments[s];this.initialize.apply(this,r),this.foundation_=void 0===n?this.getDefaultFoundation():n,this.foundation_.init(),this.initialSyncWithDOM()}return r(e,null,[{key:"attachTo",value:function(t){return new e(t,new o.a)}}]),r(e,[{key:"initialize",value:function(){}},{key:"getDefaultFoundation",value:function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")}},{key:"initialSyncWithDOM",value:function(){}},{key:"destroy",value:function(){this.foundation_.destroy()}},{key:"listen",value:function(e,t){this.root_.addEventListener(e,t)}},{key:"unlisten",value:function(e,t){this.root_.removeEventListener(e,t)}},{key:"emit",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=void 0;"function"==typeof CustomEvent?i=new CustomEvent(e,{detail:t,bubbles:n}):(i=document.createEvent("CustomEvent"),i.initCustomEvent(e,n,!1,t)),this.root_.dispatchEvent(i)}}]),e}();t.a=s},115:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"MDCMenu",function(){return _});var s=n(1),a=n(116),u=n(64),c=n(44),l=n(29),f=n(22);n.d(t,"MDCMenuFoundation",function(){return a.a}),n.d(t,"AnchorMargin",function(){return l.a}),n.d(t,"Corner",function(){return c.Corner});var d=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),h=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var s=o.get;if(void 0!==s)return s.call(i)},_=function(e){function t(){var e;i(this,t);for(var n=arguments.length,r=Array(n),s=0;s<n;s++)r[s]=arguments[s];var a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(r)));return a.menuSurface_,a.list_,a.handleKeydown_,a.handleClick_,a.afterOpenedCallback_,a}return r(t,e),d(t,[{key:"initialize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return new c.MDCMenuSurface(e)},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return new f.MDCList(e)};this.menuSurface_=e(this.root_);var n=this.root_.querySelector(u.b.LIST_SELECTOR);n&&(this.list_=t(n),this.list_.wrapFocus=!0)}},{key:"initialSyncWithDOM",value:function(){var e=this;this.afterOpenedCallback_=function(){return e.handleAfterOpened_()},this.handleKeydown_=function(t){return e.foundation_.handleKeydown(t)},this.handleClick_=function(t){return e.foundation_.handleClick(t)},this.menuSurface_.listen(l.b.strings.OPENED_EVENT,this.afterOpenedCallback_),this.listen("keydown",this.handleKeydown_),this.listen("click",this.handleClick_)}},{key:"destroy",value:function(){this.list_&&this.list_.destroy(),this.menuSurface_.destroy(),this.menuSurface_.unlisten(l.b.strings.OPENED_EVENT,this.afterOpenedCallback_),this.unlisten("keydown",this.handleKeydown_),this.unlisten("click",this.handleClick_),h(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"setAnchorCorner",value:function(e){this.menuSurface_.setAnchorCorner(e)}},{key:"setAnchorMargin",value:function(e){this.menuSurface_.setAnchorMargin(e)}},{key:"getOptionByIndex",value:function(e){return e<this.items.length?this.items[e]:null}},{key:"setFixedPosition",value:function(e){this.menuSurface_.setFixedPosition(e)}},{key:"hoistMenuToBody",value:function(){this.menuSurface_.hoistMenuToBody()}},{key:"setIsHoisted",value:function(e){this.menuSurface_.setIsHoisted(e)}},{key:"setAbsolutePosition",value:function(e,t){this.menuSurface_.setAbsolutePosition(e,t)}},{key:"setAnchorElement",value:function(e){this.menuSurface_.anchorElement=e}},{key:"handleAfterOpened_",value:function(){var e=this.items;e.length>0&&e[0].focus()}},{key:"getDefaultFoundation",value:function(){var e=this;return new a.a({addClassToElementAtIndex:function(t,n){e.items[t].classList.add(n)},removeClassFromElementAtIndex:function(t,n){e.items[t].classList.remove(n)},addAttributeToElementAtIndex:function(t,n,i){e.items[t].setAttribute(n,i)},removeAttributeFromElementAtIndex:function(t,n){e.items[t].removeAttribute(n)},elementContainsClass:function(e,t){return e.classList.contains(t)},closeSurface:function(){return e.open=!1},getElementIndex:function(t){return e.items.indexOf(t)},getParentElement:function(e){return e.parentElement},getSelectedElementIndex:function(t){return e.items.indexOf(t.querySelector("."+u.a.MENU_SELECTED_LIST_ITEM))},notifySelected:function(t){return e.emit(u.b.SELECTED_EVENT,{index:t.index,item:e.items[t.index]})},getCheckboxAtIndex:function(t){return e.items[t].querySelector(u.b.CHECKBOX_SELECTOR)},toggleCheckbox:function(e){e.checked=!e.checked;var t=document.createEvent("Event");t.initEvent("change",!1,!0),e.dispatchEvent(t)}})}},{key:"open",get:function(){return this.menuSurface_.open},set:function(e){this.menuSurface_.open=e}},{key:"items",get:function(){return this.list_.listElements_}},{key:"quickOpen",set:function(e){this.menuSurface_.quickOpen=e}}],[{key:"attachTo",value:function(e){return new t(e)}}]),t}(s.a)},116:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}n.d(t,"a",function(){return h});var s=n(0),a=(n(117),n(64)),u=n(29),c=n(20),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),d=["input","button","textarea","select"],h=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l(t.defaultAdapter,e)));return n.closeAnimationEndTimerId_=0,n}return r(t,e),f(t,null,[{key:"cssClasses",get:function(){return a.a}},{key:"strings",get:function(){return a.b}},{key:"defaultAdapter",get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},elementContainsClass:function(){},closeSurface:function(){},getElementIndex:function(){},getParentElement:function(){},getSelectedElementIndex:function(){},notifySelected:function(){},getCheckboxAtIndex:function(){},toggleCheckbox:function(){}}}}]),f(t,[{key:"destroy",value:function(){this.closeAnimationEndTimerId_&&clearTimeout(this.closeAnimationEndTimerId_),this.adapter_.closeSurface()}},{key:"handleKeydown",value:function(e){var t=e.key,n=e.keyCode,i="Space"===t||32===n,o="Enter"===t||13===n,r="Tab"===t||9===n;i||o?this.handleAction_(e):r&&this.adapter_.closeSurface()}},{key:"handleClick",value:function(e){this.handleAction_(e)}},{key:"handleAction_",value:function(e){var t=this.getListItem_(e.target);t&&(this.handleSelection_(t),this.preventDefaultEvent_(e))}},{key:"handleSelection_",value:function(e){var t=this,n=this.adapter_.getElementIndex(e);if(!(n<0)){this.adapter_.notifySelected({index:n}),this.adapter_.closeSurface();var i=this.adapter_.getCheckboxAtIndex(n);i&&this.adapter_.toggleCheckbox(i),this.closeAnimationEndTimerId_=setTimeout(function(){var i=t.getSelectionGroup_(e);null!==i&&t.handleSelectionGroup_(i,n)},u.b.numbers.TRANSITION_CLOSE_DURATION)}}},{key:"handleSelectionGroup_",value:function(e,t){var n=this.adapter_.getSelectedElementIndex(e);n>=0&&(this.adapter_.removeAttributeFromElementAtIndex(n,a.b.ARIA_SELECTED_ATTR),this.adapter_.removeClassFromElementAtIndex(n,a.a.MENU_SELECTED_LIST_ITEM)),this.adapter_.addClassToElementAtIndex(t,a.a.MENU_SELECTED_LIST_ITEM),this.adapter_.addAttributeToElementAtIndex(t,a.b.ARIA_SELECTED_ATTR,"true")}},{key:"getSelectionGroup_",value:function(e){for(var t=this.adapter_.getParentElement(e),n=this.adapter_.elementContainsClass(t,a.a.MENU_SELECTION_GROUP);!n&&!this.adapter_.elementContainsClass(t,c.a.cssClasses.ROOT);)t=this.adapter_.getParentElement(e),n=this.adapter_.elementContainsClass(t,a.a.MENU_SELECTION_GROUP);return n?t:null}},{key:"getListItem_",value:function(e){for(var t=this.adapter_.elementContainsClass(e,c.a.cssClasses.LIST_ITEM_CLASS);!t;){if(!(e=this.adapter_.getParentElement(e)))return null;t=this.adapter_.elementContainsClass(e,c.a.cssClasses.LIST_ITEM_CLASS)}return e}},{key:"preventDefaultEvent_",value:function(e){var t=e.target,n=(""+t.tagName).toLowerCase();-1===d.indexOf(n)&&e.preventDefault()}}]),t}(s.a)},117:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(){function e(){i(this,e)}o(e,[{key:"addClassToElementAtIndex",value:function(e,t){}},{key:"removeClassFromElementAtIndex",value:function(e,t){}},{key:"addAttributeToElementAtIndex",value:function(e,t,n){}},{key:"removeAttributeFromElementAtIndex",value:function(e,t){}},{key:"elementContainsClass",value:function(e,t){}},{key:"closeSurface",value:function(){}},{key:"getElementIndex",value:function(e){}},{key:"getParentElement",value:function(e){}},{key:"getSelectedElementIndex",value:function(e){}},{key:"notifySelected",value:function(e){}},{key:"getCheckboxAtIndex",value:function(e){}},{key:"toggleCheckbox",value:function(e){}}])}()},13:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(){function e(){i(this,e)}o(e,[{key:"getListItemCount",value:function(){}},{key:"getFocusedElementIndex",value:function(){}},{key:"setAttributeForElementIndex",value:function(e,t,n){}},{key:"removeAttributeForElementIndex",value:function(e,t){}},{key:"addClassForElementIndex",value:function(e,t){}},{key:"removeClassForElementIndex",value:function(e,t){}},{key:"focusItemAtIndex",value:function(e){}},{key:"setTabIndexForListItemChildren",value:function(e,t){}},{key:"followHref",value:function(e){}}])}()},14:function(e,t,n){"use strict";n.d(t,"b",function(){return o}),n.d(t,"a",function(){return i});/** | ||
* @license | ||
* Copyright 2018 Google Inc. All Rights Reserved. | ||
* Copyright 2018 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
var i={ROOT:"mdc-list",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected"},o={ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_SELECTED:"aria-selected",FOCUSABLE_CHILD_ELEMENTS:"."+i.LIST_ITEM_CLASS+" button:not(:disabled), ."+i.LIST_ITEM_CLASS+" a",ENABLED_ITEMS_SELECTOR:".mdc-list-item:not(.mdc-list-item--disabled)"}},27:function(e,t,n){"use strict";function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}n.d(t,"b",function(){return d}),n.d(t,"a",function(){return f});var a=n(0),u=(n(28),n(29)),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),f=void 0,d=function(e){function t(e){o(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,c(t.defaultAdapter,e)));return n.isOpen_=!1,n.openAnimationEndTimerId_=0,n.closeAnimationEndTimerId_=0,n.animationRequestId_=0,n.dimensions_,n.anchorCorner_=u.a.TOP_START,n.anchorMargin_={top:0,right:0,bottom:0,left:0},n.measures_=null,n.quickOpen_=!1,n.hoistedElement_=!1,n.isFixedPosition_=!1,n.position_={x:0,y:0},n}return s(t,e),l(t,null,[{key:"cssClasses",get:function(){return u.c}},{key:"strings",get:function(){return u.e}},{key:"numbers",get:function(){return u.d}},{key:"Corner",get:function(){return u.a}},{key:"defaultAdapter",get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},notifyClose:function(){},notifyOpen:function(){},isElementInContainer:function(){return!1},isRtl:function(){return!1},setTransformOrigin:function(){},isFocused:function(){return!1},saveFocus:function(){},restoreFocus:function(){},isFirstElementFocused:function(){},isLastElementFocused:function(){},focusFirstElement:function(){},focusLastElement:function(){},getInnerDimensions:function(){return{}},getAnchorDimensions:function(){return{}},getWindowDimensions:function(){return{}},getBodyDimensions:function(){return{}},getWindowScroll:function(){return{}},setPosition:function(){},setMaxHeight:function(){}}}}]),l(t,[{key:"init",value:function(){var e=t.cssClasses,n=e.ROOT,i=e.OPEN;if(!this.adapter_.hasClass(n))throw new Error(n+" class required in root element.");this.adapter_.hasClass(i)&&(this.isOpen_=!0)}},{key:"destroy",value:function(){clearTimeout(this.openAnimationEndTimerId_),clearTimeout(this.closeAnimationEndTimerId_),cancelAnimationFrame(this.animationRequestId_)}},{key:"setAnchorCorner",value:function(e){this.anchorCorner_=e}},{key:"setAnchorMargin",value:function(e){this.anchorMargin_.top="number"==typeof e.top?e.top:0,this.anchorMargin_.right="number"==typeof e.right?e.right:0,this.anchorMargin_.bottom="number"==typeof e.bottom?e.bottom:0,this.anchorMargin_.left="number"==typeof e.left?e.left:0}},{key:"setIsHoisted",value:function(e){this.hoistedElement_=e}},{key:"setFixedPosition",value:function(e){this.isFixedPosition_=e}},{key:"setAbsolutePosition",value:function(e,t){this.position_.x=this.typeCheckisFinite_(e)?e:0,this.position_.y=this.typeCheckisFinite_(t)?t:0}},{key:"setQuickOpen",value:function(e){this.quickOpen_=e}},{key:"handleBodyClick",value:function(e){var t=e.target;this.adapter_.isElementInContainer(t)||this.close()}},{key:"handleKeydown",value:function(e){var t=e.keyCode,n=e.key,i=e.shiftKey,o="Escape"===n||27===t,r="Tab"===n||9===t;o?this.close():r&&(this.adapter_.isLastElementFocused()&&!i?(this.adapter_.focusFirstElement(),e.preventDefault()):this.adapter_.isFirstElementFocused()&&i&&(this.adapter_.focusLastElement(),e.preventDefault()))}},{key:"getAutoLayoutMeasurements_",value:function(){var e=this.adapter_.getAnchorDimensions(),t=this.adapter_.getWindowDimensions(),n=this.adapter_.getBodyDimensions(),i=this.adapter_.getWindowScroll();return e||(e={x:this.position_.x,y:this.position_.y,top:this.position_.y,bottom:this.position_.y,left:this.position_.x,right:this.position_.x,height:0,width:0}),{viewport:t,bodyDimensions:n,windowScroll:i,viewportDistance:{top:e.top,right:t.width-e.right,left:e.left,bottom:t.height-e.bottom},anchorHeight:e.height,anchorWidth:e.width,surfaceHeight:this.dimensions_.height,surfaceWidth:this.dimensions_.width}}},{key:"getOriginCorner_",value:function(){var e=u.a.TOP_LEFT,t=this.measures_,n=t.viewportDistance,i=t.anchorHeight,o=t.anchorWidth,r=t.surfaceHeight,s=t.surfaceWidth,a=Boolean(this.anchorCorner_&u.b.BOTTOM),c=a?n.top+i+this.anchorMargin_.bottom:n.top+this.anchorMargin_.top,l=a?n.bottom-this.anchorMargin_.bottom:n.bottom+i-this.anchorMargin_.top,f=r-c,d=r-l;d>0&&f<d&&(e|=u.b.BOTTOM);var h=this.adapter_.isRtl(),_=Boolean(this.anchorCorner_&u.b.FLIP_RTL),m=Boolean(this.anchorCorner_&u.b.RIGHT),p=m&&!h||!m&&_&&h,y=p?n.left+o+this.anchorMargin_.right:n.left+this.anchorMargin_.left,v=p?n.right-this.anchorMargin_.right:n.right+o-this.anchorMargin_.left,E=s-y,b=s-v;return(E<0&&p&&h||m&&!p&&E<0||b>0&&E<b)&&(e|=u.b.RIGHT),e}},{key:"getHorizontalOriginOffset_",value:function(e){var t=this.measures_.anchorWidth,n=Boolean(e&u.b.RIGHT),i=Boolean(this.anchorCorner_&u.b.RIGHT);if(n){var o=i?t-this.anchorMargin_.left:this.anchorMargin_.right;return this.hoistedElement_||this.isFixedPosition_?o-(this.measures_.viewport.width-this.measures_.bodyDimensions.width):o}return i?t-this.anchorMargin_.right:this.anchorMargin_.left}},{key:"getVerticalOriginOffset_",value:function(e){var t=this.measures_.anchorHeight,n=Boolean(e&u.b.BOTTOM),i=Boolean(this.anchorCorner_&u.b.BOTTOM);return n?i?t-this.anchorMargin_.top:-this.anchorMargin_.bottom:i?t+this.anchorMargin_.bottom:this.anchorMargin_.top}},{key:"getMenuSurfaceMaxHeight_",value:function(e){var n=0,i=this.measures_.viewportDistance,o=Boolean(e&u.b.BOTTOM),r=t.numbers.MARGIN_TO_EDGE;return o?(n=i.top+this.anchorMargin_.top-r,this.anchorCorner_&u.b.BOTTOM||(n+=this.measures_.anchorHeight)):(n=i.bottom-this.anchorMargin_.bottom+this.measures_.anchorHeight-r,this.anchorCorner_&u.b.BOTTOM&&(n-=this.measures_.anchorHeight)),n}},{key:"autoPosition_",value:function(){var e;this.measures_=this.getAutoLayoutMeasurements_();var t=this.getOriginCorner_(),n=this.getMenuSurfaceMaxHeight_(t),o=t&u.b.BOTTOM?"bottom":"top",r=t&u.b.RIGHT?"right":"left",s=this.getHorizontalOriginOffset_(t),a=this.getVerticalOriginOffset_(t),c=(e={},i(e,r,s||"0"),i(e,o,a||"0"),e),l=this.measures_;l.anchorWidth/l.surfaceWidth>u.d.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(r="center"),(this.hoistedElement_||this.isFixedPosition_)&&(c=this.adjustPositionForHoistedElement_(c));for(var f in c)c.hasOwnProperty(f)&&"0"!==c[f]&&(c[f]=parseInt(c[f],10)+"px");this.adapter_.setTransformOrigin(r+" "+o),this.adapter_.setPosition(c),this.adapter_.setMaxHeight(n?n+"px":""),this.measures_=null}},{key:"adjustPositionForHoistedElement_",value:function(e){var t=this.measures_,n=t.bodyDimensions,i=t.windowScroll,o=t.viewport,r=t.viewportDistance;for(var s in e)e.hasOwnProperty(s)&&(r.hasOwnProperty(s)&&(e[s]=parseInt(e[s],10)+r[s]),this.isFixedPosition_||"top"!==s?this.isFixedPosition_||"bottom"!==s||(e[s]=n.height-(o.height+i.y)+parseInt(e[s],10)):e[s]=parseInt(e[s],10)+i.y);return e}},{key:"open",value:function(){var e=this;this.adapter_.saveFocus(),this.quickOpen_||this.adapter_.addClass(t.cssClasses.ANIMATING_OPEN),this.animationRequestId_=requestAnimationFrame(function(){e.adapter_.addClass(t.cssClasses.OPEN),e.dimensions_=e.adapter_.getInnerDimensions(),e.autoPosition_(),e.quickOpen_?e.adapter_.notifyOpen():e.openAnimationEndTimerId_=setTimeout(function(){e.openAnimationEndTimerId_=0,e.adapter_.removeClass(t.cssClasses.ANIMATING_OPEN),e.adapter_.notifyOpen()},u.d.TRANSITION_OPEN_DURATION)}),this.isOpen_=!0}},{key:"close",value:function(){var e=this;this.quickOpen_||this.adapter_.addClass(t.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){e.adapter_.removeClass(t.cssClasses.OPEN),e.quickOpen_?e.adapter_.notifyClose():e.closeAnimationEndTimerId_=setTimeout(function(){e.closeAnimationEndTimerId_=0,e.adapter_.removeClass(t.cssClasses.ANIMATING_CLOSED),e.adapter_.notifyClose()},u.d.TRANSITION_CLOSE_DURATION)}),this.isOpen_=!1,this.maybeRestoreFocus_()}},{key:"maybeRestoreFocus_",value:function(){(this.adapter_.isFocused()||this.adapter_.isElementInContainer(document.activeElement))&&this.adapter_.restoreFocus()}},{key:"isOpen",value:function(){return this.isOpen_}},{key:"typeCheckisFinite_",value:function(e){return"number"==typeof e&&isFinite(e)}}]),t}(a.a)},28:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(){function e(){i(this,e)}o(e,[{key:"addClass",value:function(e){}},{key:"removeClass",value:function(e){}},{key:"hasClass",value:function(e){}},{key:"hasAnchor",value:function(){}},{key:"notifyClose",value:function(){}},{key:"notifyOpen",value:function(){}},{key:"isElementInContainer",value:function(e){}},{key:"isRtl",value:function(){}},{key:"setTransformOrigin",value:function(e){}},{key:"isFocused",value:function(){}},{key:"saveFocus",value:function(){}},{key:"restoreFocus",value:function(){}},{key:"isFirstElementFocused",value:function(){}},{key:"isLastElementFocused",value:function(){}},{key:"focusFirstElement",value:function(){}},{key:"focusLastElement",value:function(){}},{key:"getInnerDimensions",value:function(){}},{key:"getAnchorDimensions",value:function(){}},{key:"getWindowDimensions",value:function(){}},{key:"getBodyDimensions",value:function(){}},{key:"getWindowScroll",value:function(){}},{key:"setPosition",value:function(e){}},{key:"setMaxHeight",value:function(e){}}])}()},29:function(e,t,n){"use strict";n.d(t,"c",function(){return i}),n.d(t,"e",function(){return o}),n.d(t,"d",function(){return r}),n.d(t,"b",function(){return s}),n.d(t,"a",function(){return a});/** | ||
var i={ROOT:"mdc-list",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected",LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated"},o={ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_SELECTED:"aria-selected",FOCUSABLE_CHILD_ELEMENTS:"."+i.LIST_ITEM_CLASS+" button:not(:disabled), ."+i.LIST_ITEM_CLASS+" a",ENABLED_ITEMS_SELECTOR:".mdc-list-item:not(.mdc-list-item--disabled)"}},20:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(0),a=(n(13),n(14)),u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=["input","button","textarea","select"],f=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,u(t.defaultAdapter,e)));return n.wrapFocus_=!1,n.isVertical_=!0,n.isSingleSelectionList_=!1,n.selectedIndex_=-1,n.useActivatedClass_=!1,n}return r(t,e),c(t,null,[{key:"strings",get:function(){return a.b}},{key:"cssClasses",get:function(){return a.a}},{key:"defaultAdapter",get:function(){return{getListItemCount:function(){},getFocusedElementIndex:function(){},setAttributeForElementIndex:function(){},removeAttributeForElementIndex:function(){},addClassForElementIndex:function(){},removeClassForElementIndex:function(){},focusItemAtIndex:function(){},setTabIndexForListItemChildren:function(){},followHref:function(){}}}}]),c(t,[{key:"setWrapFocus",value:function(e){this.wrapFocus_=e}},{key:"setVerticalOrientation",value:function(e){this.isVertical_=e}},{key:"setSingleSelection",value:function(e){this.isSingleSelectionList_=e}},{key:"setUseActivatedClass",value:function(e){this.useActivatedClass_=e}},{key:"setSelectedIndex",value:function(e){if(e!==this.selectedIndex_){var t=this.useActivatedClass_?a.a.LIST_ITEM_ACTIVATED_CLASS:a.a.LIST_ITEM_SELECTED_CLASS;this.selectedIndex_>=0&&(this.adapter_.removeAttributeForElementIndex(this.selectedIndex_,a.b.ARIA_SELECTED),this.adapter_.removeClassForElementIndex(this.selectedIndex_,t),this.adapter_.setAttributeForElementIndex(this.selectedIndex_,"tabindex",-1)),e>=0&&this.adapter_.getListItemCount()>e&&(this.selectedIndex_=e,this.adapter_.setAttributeForElementIndex(this.selectedIndex_,a.b.ARIA_SELECTED,!0),this.adapter_.addClassForElementIndex(this.selectedIndex_,t),this.adapter_.setAttributeForElementIndex(this.selectedIndex_,"tabindex",0),0!==this.selectedIndex_&&this.adapter_.setAttributeForElementIndex(0,"tabindex",-1))}}},{key:"handleFocusIn",value:function(e,t){t>=0&&this.adapter_.setTabIndexForListItemChildren(t,0)}},{key:"handleFocusOut",value:function(e,t){t>=0&&this.adapter_.setTabIndexForListItemChildren(t,-1)}},{key:"handleKeydown",value:function(e,t,n){var i="ArrowLeft"===e.key||37===e.keyCode,o="ArrowUp"===e.key||38===e.keyCode,r="ArrowRight"===e.key||39===e.keyCode,s="ArrowDown"===e.key||40===e.keyCode,a="Home"===e.key||36===e.keyCode,u="End"===e.key||35===e.keyCode,c="Enter"===e.key||13===e.keyCode,l="Space"===e.key||32===e.keyCode,f=this.adapter_.getFocusedElementIndex();-1===f&&(f=n)<0||(this.isVertical_&&s||!this.isVertical_&&r?(this.preventDefaultEvent_(e),this.focusNextElement(f)):this.isVertical_&&o||!this.isVertical_&&i?(this.preventDefaultEvent_(e),this.focusPrevElement(f)):a?(this.preventDefaultEvent_(e),this.focusFirstElement()):u?(this.preventDefaultEvent_(e),this.focusLastElement()):this.isSingleSelectionList_&&(c||l)&&(this.preventDefaultEvent_(e),t&&(this.setSelectedIndex(f),this.adapter_.followHref(f))))}},{key:"handleClick",value:function(){var e=this.adapter_.getFocusedElementIndex();-1!==e&&this.setSelectedIndex(e)}},{key:"preventDefaultEvent_",value:function(e){var t=(""+e.target.tagName).toLowerCase();-1===l.indexOf(t)&&e.preventDefault()}},{key:"focusNextElement",value:function(e){var t=this.adapter_.getListItemCount(),n=e+1;if(n>=t){if(!this.wrapFocus_)return;n=0}this.adapter_.focusItemAtIndex(n)}},{key:"focusPrevElement",value:function(e){var t=e-1;if(t<0){if(!this.wrapFocus_)return;t=this.adapter_.getListItemCount()-1}this.adapter_.focusItemAtIndex(t)}},{key:"focusFirstElement",value:function(){this.adapter_.getListItemCount()>0&&this.adapter_.focusItemAtIndex(0)}},{key:"focusLastElement",value:function(){var e=this.adapter_.getListItemCount()-1;e>=0&&this.adapter_.focusItemAtIndex(e)}}]),t}(s.a);t.a=f},22:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"MDCList",function(){return f});var s=n(1),a=n(20),u=(n(13),n(14));n.d(t,"MDCListFoundation",function(){return a.a});var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),f=function(e){function t(){var e;i(this,t);for(var n=arguments.length,r=Array(n),s=0;s<n;s++)r[s]=arguments[s];var a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(r)));return a.handleKeydown_,a.handleClick_,a.focusInEventListener_,a.focusOutEventListener_,a}return r(t,e),l(t,[{key:"destroy",value:function(){this.root_.removeEventListener("keydown",this.handleKeydown_),this.root_.removeEventListener("click",this.handleClick_),this.root_.removeEventListener("focusin",this.focusInEventListener_),this.root_.removeEventListener("focusout",this.focusOutEventListener_)}},{key:"initialSyncWithDOM",value:function(){this.handleClick_=this.foundation_.handleClick.bind(this.foundation_),this.handleKeydown_=this.handleKeydownEvent_.bind(this),this.focusInEventListener_=this.handleFocusInEvent_.bind(this),this.focusOutEventListener_=this.handleFocusOutEvent_.bind(this),this.root_.addEventListener("keydown",this.handleKeydown_),this.root_.addEventListener("focusin",this.focusInEventListener_),this.root_.addEventListener("focusout",this.focusOutEventListener_),this.layout(),this.initializeListType()}},{key:"layout",value:function(){var e=this.root_.getAttribute(u.b.ARIA_ORIENTATION);this.vertical=e!==u.b.ARIA_ORIENTATION_HORIZONTAL,[].slice.call(this.root_.querySelectorAll(".mdc-list-item:not([tabindex])")).forEach(function(e){e.setAttribute("tabindex",-1)}),[].slice.call(this.root_.querySelectorAll(u.b.FOCUSABLE_CHILD_ELEMENTS)).forEach(function(e){return e.setAttribute("tabindex",-1)})}},{key:"getListItemIndex_",value:function(e){for(var t=e.target,n=-1;!t.classList.contains(u.a.LIST_ITEM_CLASS)&&!t.classList.contains(u.a.ROOT);)t=t.parentElement;return t.classList.contains(u.a.LIST_ITEM_CLASS)&&(n=this.listElements_.indexOf(t)),n}},{key:"handleFocusInEvent_",value:function(e){var t=this.getListItemIndex_(e);this.foundation_.handleFocusIn(e,t)}},{key:"handleFocusOutEvent_",value:function(e){var t=this.getListItemIndex_(e);this.foundation_.handleFocusOut(e,t)}},{key:"handleKeydownEvent_",value:function(e){var t=this.getListItemIndex_(e);t>=0&&this.foundation_.handleKeydown(e,e.target.classList.contains(u.a.LIST_ITEM_CLASS),t)}},{key:"initializeListType",value:function(){var e=this.root_.querySelector("."+u.a.LIST_ITEM_ACTIVATED_CLASS+", ."+u.a.LIST_ITEM_SELECTED_CLASS);e&&(e.classList.contains(u.a.LIST_ITEM_ACTIVATED_CLASS)&&this.foundation_.setUseActivatedClass(!0),this.singleSelection=!0,this.selectedIndex=this.listElements_.indexOf(e))}},{key:"getDefaultFoundation",value:function(){var e=this;return new a.a(c({getListItemCount:function(){return e.listElements_.length},getFocusedElementIndex:function(){return e.listElements_.indexOf(document.activeElement)},setAttributeForElementIndex:function(t,n,i){var o=e.listElements_[t];o&&o.setAttribute(n,i)},removeAttributeForElementIndex:function(t,n){var i=e.listElements_[t];i&&i.removeAttribute(n)},addClassForElementIndex:function(t,n){var i=e.listElements_[t];i&&i.classList.add(n)},removeClassForElementIndex:function(t,n){var i=e.listElements_[t];i&&i.classList.remove(n)},focusItemAtIndex:function(t){var n=e.listElements_[t];n&&n.focus()},setTabIndexForListItemChildren:function(t,n){var i=e.listElements_[t];[].slice.call(i.querySelectorAll(u.b.FOCUSABLE_CHILD_ELEMENTS)).forEach(function(e){return e.setAttribute("tabindex",n)})},followHref:function(t){var n=e.listElements_[t];n&&n.href&&n.click()}}))}},{key:"vertical",set:function(e){this.foundation_.setVerticalOrientation(e)}},{key:"listElements_",get:function(){return[].slice.call(this.root_.querySelectorAll(u.b.ENABLED_ITEMS_SELECTOR))}},{key:"wrapFocus",set:function(e){this.foundation_.setWrapFocus(e)}},{key:"singleSelection",set:function(e){e?this.root_.addEventListener("click",this.handleClick_):this.root_.removeEventListener("click",this.handleClick_),this.foundation_.setSingleSelection(e)}},{key:"selectedIndex",set:function(e){this.foundation_.setSelectedIndex(e)}}],[{key:"attachTo",value:function(e){return new t(e)}}]),t}(s.a)},29:function(e,t,n){"use strict";function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}n.d(t,"b",function(){return d}),n.d(t,"a",function(){return f});var a=n(0),u=(n(30),n(31)),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),f=void 0,d=function(e){function t(e){o(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,c(t.defaultAdapter,e)));return n.isOpen_=!1,n.openAnimationEndTimerId_=0,n.closeAnimationEndTimerId_=0,n.animationRequestId_=0,n.dimensions_,n.anchorCorner_=u.a.TOP_START,n.anchorMargin_={top:0,right:0,bottom:0,left:0},n.measures_=null,n.quickOpen_=!1,n.hoistedElement_=!1,n.isFixedPosition_=!1,n.position_={x:0,y:0},n}return s(t,e),l(t,null,[{key:"cssClasses",get:function(){return u.c}},{key:"strings",get:function(){return u.e}},{key:"numbers",get:function(){return u.d}},{key:"Corner",get:function(){return u.a}},{key:"defaultAdapter",get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},notifyClose:function(){},notifyOpen:function(){},isElementInContainer:function(){return!1},isRtl:function(){return!1},setTransformOrigin:function(){},isFocused:function(){return!1},saveFocus:function(){},restoreFocus:function(){},isFirstElementFocused:function(){},isLastElementFocused:function(){},focusFirstElement:function(){},focusLastElement:function(){},getInnerDimensions:function(){return{}},getAnchorDimensions:function(){return{}},getWindowDimensions:function(){return{}},getBodyDimensions:function(){return{}},getWindowScroll:function(){return{}},setPosition:function(){},setMaxHeight:function(){}}}}]),l(t,[{key:"init",value:function(){var e=t.cssClasses,n=e.ROOT,i=e.OPEN;if(!this.adapter_.hasClass(n))throw new Error(n+" class required in root element.");this.adapter_.hasClass(i)&&(this.isOpen_=!0)}},{key:"destroy",value:function(){clearTimeout(this.openAnimationEndTimerId_),clearTimeout(this.closeAnimationEndTimerId_),cancelAnimationFrame(this.animationRequestId_)}},{key:"setAnchorCorner",value:function(e){this.anchorCorner_=e}},{key:"setAnchorMargin",value:function(e){this.anchorMargin_.top="number"==typeof e.top?e.top:0,this.anchorMargin_.right="number"==typeof e.right?e.right:0,this.anchorMargin_.bottom="number"==typeof e.bottom?e.bottom:0,this.anchorMargin_.left="number"==typeof e.left?e.left:0}},{key:"setIsHoisted",value:function(e){this.hoistedElement_=e}},{key:"setFixedPosition",value:function(e){this.isFixedPosition_=e}},{key:"setAbsolutePosition",value:function(e,t){this.position_.x=this.typeCheckisFinite_(e)?e:0,this.position_.y=this.typeCheckisFinite_(t)?t:0}},{key:"setQuickOpen",value:function(e){this.quickOpen_=e}},{key:"handleBodyClick",value:function(e){var t=e.target;this.adapter_.isElementInContainer(t)||this.close()}},{key:"handleKeydown",value:function(e){var t=e.keyCode,n=e.key,i=e.shiftKey,o="Escape"===n||27===t,r="Tab"===n||9===t;o?this.close():r&&(this.adapter_.isLastElementFocused()&&!i?(this.adapter_.focusFirstElement(),e.preventDefault()):this.adapter_.isFirstElementFocused()&&i&&(this.adapter_.focusLastElement(),e.preventDefault()))}},{key:"getAutoLayoutMeasurements_",value:function(){var e=this.adapter_.getAnchorDimensions(),t=this.adapter_.getWindowDimensions(),n=this.adapter_.getBodyDimensions(),i=this.adapter_.getWindowScroll();return e||(e={x:this.position_.x,y:this.position_.y,top:this.position_.y,bottom:this.position_.y,left:this.position_.x,right:this.position_.x,height:0,width:0}),{viewport:t,bodyDimensions:n,windowScroll:i,viewportDistance:{top:e.top,right:t.width-e.right,left:e.left,bottom:t.height-e.bottom},anchorHeight:e.height,anchorWidth:e.width,surfaceHeight:this.dimensions_.height,surfaceWidth:this.dimensions_.width}}},{key:"getOriginCorner_",value:function(){var e=u.a.TOP_LEFT,t=this.measures_,n=t.viewportDistance,i=t.anchorHeight,o=t.anchorWidth,r=t.surfaceHeight,s=t.surfaceWidth,a=Boolean(this.anchorCorner_&u.b.BOTTOM),c=a?n.top+i+this.anchorMargin_.bottom:n.top+this.anchorMargin_.top,l=a?n.bottom-this.anchorMargin_.bottom:n.bottom+i-this.anchorMargin_.top,f=r-c,d=r-l;d>0&&f<d&&(e|=u.b.BOTTOM);var h=this.adapter_.isRtl(),_=Boolean(this.anchorCorner_&u.b.FLIP_RTL),m=Boolean(this.anchorCorner_&u.b.RIGHT),y=m&&!h||!m&&_&&h,v=y?n.left+o+this.anchorMargin_.right:n.left+this.anchorMargin_.left,p=y?n.right-this.anchorMargin_.right:n.right+o-this.anchorMargin_.left,E=s-v,b=s-p;return(E<0&&y&&h||m&&!y&&E<0||b>0&&E<b)&&(e|=u.b.RIGHT),e}},{key:"getHorizontalOriginOffset_",value:function(e){var t=this.measures_.anchorWidth,n=Boolean(e&u.b.RIGHT),i=Boolean(this.anchorCorner_&u.b.RIGHT);if(n){var o=i?t-this.anchorMargin_.left:this.anchorMargin_.right;return this.hoistedElement_||this.isFixedPosition_?o-(this.measures_.viewport.width-this.measures_.bodyDimensions.width):o}return i?t-this.anchorMargin_.right:this.anchorMargin_.left}},{key:"getVerticalOriginOffset_",value:function(e){var t=this.measures_.anchorHeight,n=Boolean(e&u.b.BOTTOM),i=Boolean(this.anchorCorner_&u.b.BOTTOM);return n?i?t-this.anchorMargin_.top:-this.anchorMargin_.bottom:i?t+this.anchorMargin_.bottom:this.anchorMargin_.top}},{key:"getMenuSurfaceMaxHeight_",value:function(e){var n=0,i=this.measures_.viewportDistance,o=Boolean(e&u.b.BOTTOM),r=t.numbers.MARGIN_TO_EDGE;return o?(n=i.top+this.anchorMargin_.top-r,this.anchorCorner_&u.b.BOTTOM||(n+=this.measures_.anchorHeight)):(n=i.bottom-this.anchorMargin_.bottom+this.measures_.anchorHeight-r,this.anchorCorner_&u.b.BOTTOM&&(n-=this.measures_.anchorHeight)),n}},{key:"autoPosition_",value:function(){var e;this.measures_=this.getAutoLayoutMeasurements_();var t=this.getOriginCorner_(),n=this.getMenuSurfaceMaxHeight_(t),o=t&u.b.BOTTOM?"bottom":"top",r=t&u.b.RIGHT?"right":"left",s=this.getHorizontalOriginOffset_(t),a=this.getVerticalOriginOffset_(t),c=(e={},i(e,r,s||"0"),i(e,o,a||"0"),e),l=this.measures_;l.anchorWidth/l.surfaceWidth>u.d.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(r="center"),(this.hoistedElement_||this.isFixedPosition_)&&(c=this.adjustPositionForHoistedElement_(c));for(var f in c)c.hasOwnProperty(f)&&"0"!==c[f]&&(c[f]=parseInt(c[f],10)+"px");this.adapter_.setTransformOrigin(r+" "+o),this.adapter_.setPosition(c),this.adapter_.setMaxHeight(n?n+"px":""),this.measures_=null}},{key:"adjustPositionForHoistedElement_",value:function(e){var t=this.measures_,n=t.bodyDimensions,i=t.windowScroll,o=t.viewport,r=t.viewportDistance;for(var s in e)e.hasOwnProperty(s)&&(r.hasOwnProperty(s)&&(e[s]=parseInt(e[s],10)+r[s]),this.isFixedPosition_||"top"!==s?this.isFixedPosition_||"bottom"!==s||(e[s]=n.height-(o.height+i.y)+parseInt(e[s],10)):e[s]=parseInt(e[s],10)+i.y);return e}},{key:"open",value:function(){var e=this;this.adapter_.saveFocus(),this.quickOpen_||this.adapter_.addClass(t.cssClasses.ANIMATING_OPEN),this.animationRequestId_=requestAnimationFrame(function(){e.adapter_.addClass(t.cssClasses.OPEN),e.dimensions_=e.adapter_.getInnerDimensions(),e.autoPosition_(),e.quickOpen_?e.adapter_.notifyOpen():e.openAnimationEndTimerId_=setTimeout(function(){e.openAnimationEndTimerId_=0,e.adapter_.removeClass(t.cssClasses.ANIMATING_OPEN),e.adapter_.notifyOpen()},u.d.TRANSITION_OPEN_DURATION)}),this.isOpen_=!0}},{key:"close",value:function(){var e=this;this.quickOpen_||this.adapter_.addClass(t.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){e.adapter_.removeClass(t.cssClasses.OPEN),e.quickOpen_?e.adapter_.notifyClose():e.closeAnimationEndTimerId_=setTimeout(function(){e.closeAnimationEndTimerId_=0,e.adapter_.removeClass(t.cssClasses.ANIMATING_CLOSED),e.adapter_.notifyClose()},u.d.TRANSITION_CLOSE_DURATION)}),this.isOpen_=!1,this.maybeRestoreFocus_()}},{key:"maybeRestoreFocus_",value:function(){(this.adapter_.isFocused()||this.adapter_.isElementInContainer(document.activeElement))&&this.adapter_.restoreFocus()}},{key:"isOpen",value:function(){return this.isOpen_}},{key:"typeCheckisFinite_",value:function(e){return"number"==typeof e&&isFinite(e)}}]),t}(a.a)},30:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(){function e(){i(this,e)}o(e,[{key:"addClass",value:function(e){}},{key:"removeClass",value:function(e){}},{key:"hasClass",value:function(e){}},{key:"hasAnchor",value:function(){}},{key:"notifyClose",value:function(){}},{key:"notifyOpen",value:function(){}},{key:"isElementInContainer",value:function(e){}},{key:"isRtl",value:function(){}},{key:"setTransformOrigin",value:function(e){}},{key:"isFocused",value:function(){}},{key:"saveFocus",value:function(){}},{key:"restoreFocus",value:function(){}},{key:"isFirstElementFocused",value:function(){}},{key:"isLastElementFocused",value:function(){}},{key:"focusFirstElement",value:function(){}},{key:"focusLastElement",value:function(){}},{key:"getInnerDimensions",value:function(){}},{key:"getAnchorDimensions",value:function(){}},{key:"getWindowDimensions",value:function(){}},{key:"getBodyDimensions",value:function(){}},{key:"getWindowScroll",value:function(){}},{key:"setPosition",value:function(e){}},{key:"setMaxHeight",value:function(e){}}])}()},31:function(e,t,n){"use strict";n.d(t,"c",function(){return i}),n.d(t,"e",function(){return o}),n.d(t,"d",function(){return r}),n.d(t,"b",function(){return s}),n.d(t,"a",function(){return a});/** | ||
* @license | ||
* Copyright 2018 Google Inc. All Rights Reserved. | ||
* Copyright 2018 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
var i={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},o={CLOSED_EVENT:"MDCMenuSurface:closed",OPENED_EVENT:"MDCMenuSurface:opened",FOCUSABLE_ELEMENTS:'button:not(:disabled), [href]:not([aria-disabled="true"]), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'},r={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67},s={BOTTOM:1,CENTER:2,RIGHT:4,FLIP_RTL:8},a={TOP_LEFT:0,TOP_RIGHT:s.RIGHT,BOTTOM_LEFT:s.BOTTOM,BOTTOM_RIGHT:s.BOTTOM|s.RIGHT,TOP_START:s.FLIP_RTL,TOP_END:s.FLIP_RTL|s.RIGHT,BOTTOM_START:s.BOTTOM|s.FLIP_RTL,BOTTOM_END:s.BOTTOM|s.RIGHT|s.FLIP_RTL}},40:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(0),a=(n(22),n(23)),u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=["input","button","textarea","select"],f=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,u(t.defaultAdapter,e)));return n.wrapFocus_=!1,n.isVertical_=!0,n.isSingleSelectionList_=!1,n.selectedIndex_=-1,n}return r(t,e),c(t,null,[{key:"strings",get:function(){return a.b}},{key:"cssClasses",get:function(){return a.a}},{key:"defaultAdapter",get:function(){return{getListItemCount:function(){},getFocusedElementIndex:function(){},getListItemIndex:function(){},setAttributeForElementIndex:function(){},removeAttributeForElementIndex:function(){},addClassForElementIndex:function(){},removeClassForElementIndex:function(){},focusItemAtIndex:function(){},isElementFocusable:function(){},isListItem:function(){},setTabIndexForListItemChildren:function(){}}}}]),c(t,[{key:"setWrapFocus",value:function(e){this.wrapFocus_=e}},{key:"setVerticalOrientation",value:function(e){this.isVertical_=e}},{key:"setSingleSelection",value:function(e){this.isSingleSelectionList_=e}},{key:"setSelectedIndex",value:function(e){if(e===this.selectedIndex_)return this.adapter_.removeAttributeForElementIndex(this.selectedIndex_,a.b.ARIA_SELECTED),this.adapter_.removeClassForElementIndex(this.selectedIndex_,a.a.LIST_ITEM_SELECTED_CLASS),this.selectedIndex_>=0&&(this.adapter_.setAttributeForElementIndex(this.selectedIndex_,"tabindex",-1),this.adapter_.setAttributeForElementIndex(0,"tabindex",0)),void(this.selectedIndex_=-1);this.selectedIndex_>=0&&(this.adapter_.removeAttributeForElementIndex(this.selectedIndex_,a.b.ARIA_SELECTED),this.adapter_.removeClassForElementIndex(this.selectedIndex_,a.a.LIST_ITEM_SELECTED_CLASS),this.adapter_.setAttributeForElementIndex(this.selectedIndex_,"tabindex",-1)),e>=0&&this.adapter_.getListItemCount()>e&&(this.selectedIndex_=e,this.adapter_.setAttributeForElementIndex(this.selectedIndex_,a.b.ARIA_SELECTED,!0),this.adapter_.addClassForElementIndex(this.selectedIndex_,a.a.LIST_ITEM_SELECTED_CLASS),this.adapter_.setAttributeForElementIndex(this.selectedIndex_,"tabindex",0),0!==this.selectedIndex_&&this.adapter_.setAttributeForElementIndex(0,"tabindex",-1))}},{key:"handleFocusIn",value:function(e){var t=this.getListItem_(e.target);if(t){var n=this.adapter_.getListItemIndex(t);n>=0&&this.adapter_.setTabIndexForListItemChildren(n,0)}}},{key:"handleFocusOut",value:function(e){var t=this.getListItem_(e.target);if(t){var n=this.adapter_.getListItemIndex(t);n>=0&&this.adapter_.setTabIndexForListItemChildren(n,-1)}}},{key:"handleKeydown",value:function(e){var t="ArrowLeft"===e.key||37===e.keyCode,n="ArrowUp"===e.key||38===e.keyCode,i="ArrowRight"===e.key||39===e.keyCode,o="ArrowDown"===e.key||40===e.keyCode,r="Home"===e.key||36===e.keyCode,s="End"===e.key||35===e.keyCode,a="Enter"===e.key||13===e.keyCode,u="Space"===e.key||32===e.keyCode,c=this.adapter_.getFocusedElementIndex();-1===c&&(c=this.adapter_.getListItemIndex(this.getListItem_(e.target)))<0||(this.isVertical_&&o||!this.isVertical_&&i?(this.preventDefaultEvent_(e),this.focusNextElement(c)):this.isVertical_&&n||!this.isVertical_&&t?(this.preventDefaultEvent_(e),this.focusPrevElement(c)):r?(this.preventDefaultEvent_(e),this.focusFirstElement()):s?(this.preventDefaultEvent_(e),this.focusLastElement()):this.isSingleSelectionList_&&(a||u)&&(this.preventDefaultEvent_(e),this.adapter_.isListItem(e.target)&&this.setSelectedIndex(c)))}},{key:"handleClick",value:function(){var e=this.adapter_.getFocusedElementIndex();-1!==e&&this.setSelectedIndex(e)}},{key:"preventDefaultEvent_",value:function(e){var t=(""+e.target.tagName).toLowerCase();-1===l.indexOf(t)&&e.preventDefault()}},{key:"focusNextElement",value:function(e){var t=this.adapter_.getListItemCount(),n=e+1;if(n>=t){if(!this.wrapFocus_)return;n=0}this.adapter_.focusItemAtIndex(n)}},{key:"focusPrevElement",value:function(e){var t=e-1;if(t<0){if(!this.wrapFocus_)return;t=this.adapter_.getListItemCount()-1}this.adapter_.focusItemAtIndex(t)}},{key:"focusFirstElement",value:function(){this.adapter_.getListItemCount()>0&&this.adapter_.focusItemAtIndex(0)}},{key:"focusLastElement",value:function(){var e=this.adapter_.getListItemCount()-1;e>=0&&this.adapter_.focusItemAtIndex(e)}},{key:"getListItem_",value:function(e){for(;!this.adapter_.isListItem(e);){if(!e.parentElement)return null;e=e.parentElement}return e}}]),t}(s.a);t.a=f},45:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"MDCList",function(){return f});var s=n(1),a=n(40),u=(n(22),n(23));n.d(t,"MDCListFoundation",function(){return a.a});var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),f=function(e){function t(){var e;i(this,t);for(var n=arguments.length,r=Array(n),s=0;s<n;s++)r[s]=arguments[s];var a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(r)));return a.handleKeydown_,a.handleClick_,a.focusInEventListener_,a.focusOutEventListener_,a}return r(t,e),l(t,[{key:"destroy",value:function(){this.root_.removeEventListener("keydown",this.handleKeydown_),this.root_.removeEventListener("click",this.handleClick_),this.root_.removeEventListener("focusin",this.focusInEventListener_),this.root_.removeEventListener("focusout",this.focusOutEventListener_)}},{key:"initialSyncWithDOM",value:function(){this.handleKeydown_=this.foundation_.handleKeydown.bind(this.foundation_),this.handleClick_=this.foundation_.handleClick.bind(this.foundation_),this.focusInEventListener_=this.foundation_.handleFocusIn.bind(this.foundation_),this.focusOutEventListener_=this.foundation_.handleFocusOut.bind(this.foundation_),this.root_.addEventListener("keydown",this.handleKeydown_),this.root_.addEventListener("focusin",this.focusInEventListener_),this.root_.addEventListener("focusout",this.focusOutEventListener_),this.layout()}},{key:"layout",value:function(){var e=this.root_.getAttribute(u.b.ARIA_ORIENTATION);this.vertical=e!==u.b.ARIA_ORIENTATION_HORIZONTAL,[].slice.call(this.root_.querySelectorAll(".mdc-list-item:not([tabindex])")).forEach(function(e){e.setAttribute("tabindex",-1)}),[].slice.call(this.root_.querySelectorAll(u.b.FOCUSABLE_CHILD_ELEMENTS)).forEach(function(e){return e.setAttribute("tabindex",-1)})}},{key:"getDefaultFoundation",value:function(){var e=this;return new a.a(c({getListItemCount:function(){return e.listElements_.length},getFocusedElementIndex:function(){return e.listElements_.indexOf(document.activeElement)},getListItemIndex:function(t){return e.listElements_.indexOf(t)},setAttributeForElementIndex:function(t,n,i){var o=e.listElements_[t];o&&o.setAttribute(n,i)},removeAttributeForElementIndex:function(t,n){var i=e.listElements_[t];i&&i.removeAttribute(n)},addClassForElementIndex:function(t,n){var i=e.listElements_[t];i&&i.classList.add(n)},removeClassForElementIndex:function(t,n){var i=e.listElements_[t];i&&i.classList.remove(n)},isListItem:function(e){return e.classList.contains(u.a.LIST_ITEM_CLASS)},focusItemAtIndex:function(t){var n=e.listElements_[t];n&&n.focus()},isElementFocusable:function(e){if(!e)return!1;var t=Element.prototype.matches;return t||(t=Element.prototype.msMatchesSelector),t.call(e,u.b.FOCUSABLE_CHILD_ELEMENTS)},setTabIndexForListItemChildren:function(t,n){var i=e.listElements_[t];[].slice.call(i.querySelectorAll(u.b.FOCUSABLE_CHILD_ELEMENTS)).forEach(function(e){return e.setAttribute("tabindex",n)})}}))}},{key:"vertical",set:function(e){this.foundation_.setVerticalOrientation(e)}},{key:"listElements_",get:function(){return[].slice.call(this.root_.querySelectorAll(u.b.ENABLED_ITEMS_SELECTOR))}},{key:"wrapFocus",set:function(e){this.foundation_.setWrapFocus(e)}},{key:"singleSelection",set:function(e){e?this.root_.addEventListener("click",this.handleClick_):this.root_.removeEventListener("click",this.handleClick_),this.foundation_.setSingleSelection(e);var t=this.root_.querySelector(".mdc-list-item--selected");t&&(this.selectedIndex=this.listElements_.indexOf(t))}},{key:"selectedIndex",set:function(e){this.foundation_.setSelectedIndex(e)}}],[{key:"attachTo",value:function(e){return new t(e)}}]),t}(s.a)},46:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"MDCMenuSurface",function(){return h});var s=n(1),a=n(47),u=n(27),c=(n(28),n(29));n.d(t,"MDCMenuSurfaceFoundation",function(){return u.b}),n.d(t,"AnchorMargin",function(){return u.a}),n.d(t,"Corner",function(){return c.a}),n.d(t,"CornerBit",function(){return c.b}),n.d(t,"util",function(){return a});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),d=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var s=o.get;if(void 0!==s)return s.call(i)},h=function(e){function t(){var e;i(this,t);for(var n=arguments.length,r=Array(n),s=0;s<n;s++)r[s]=arguments[s];var a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(r)));return a.previousFocus_,a.anchorElement,a.firstFocusableElement_,a.lastFocusableElement_,a.handleKeydown_,a.handleBodyClick_,a.registerBodyClickListener_,a.deregisterBodyClickListener_,a}return r(t,e),f(t,[{key:"initialSyncWithDOM",value:function(){var e=this;this.root_.parentElement&&this.root_.parentElement.classList.contains(c.c.ANCHOR)&&(this.anchorElement=this.root_.parentElement),this.root_.classList.contains(c.c.FIXED)&&this.setFixedPosition(!0),this.handleKeydown_=function(t){return e.foundation_.handleKeydown(t)},this.handleBodyClick_=function(t){return e.foundation_.handleBodyClick(t)},this.registerBodyClickListener_=function(){return document.body.addEventListener("click",e.handleBodyClick_)},this.deregisterBodyClickListener_=function(){return document.body.removeEventListener("click",e.handleBodyClick_)},this.root_.addEventListener("keydown",this.handleKeydown_),this.root_.addEventListener(c.e.OPENED_EVENT,this.registerBodyClickListener_),this.root_.addEventListener(c.e.CLOSED_EVENT,this.deregisterBodyClickListener_)}},{key:"destroy",value:function(){this.root_.removeEventListener("keydown",this.handleKeydown_),this.root_.removeEventListener(c.e.OPENED_EVENT,this.registerBodyClickListener_),this.root_.removeEventListener(c.e.CLOSED_EVENT,this.deregisterBodyClickListener_),d(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"hoistMenuToBody",value:function(){document.body.appendChild(this.root_.parentElement.removeChild(this.root_)),this.setIsHoisted(!0)}},{key:"setIsHoisted",value:function(e){this.foundation_.setIsHoisted(e)}},{key:"setMenuSurfaceAnchorElement",value:function(e){this.anchorElement=e}},{key:"setFixedPosition",value:function(e){e?this.root_.classList.add(c.c.FIXED):this.root_.classList.remove(c.c.FIXED),this.foundation_.setFixedPosition(e)}},{key:"setAbsolutePosition",value:function(e,t){this.foundation_.setAbsolutePosition(e,t),this.setIsHoisted(!0)}},{key:"setAnchorCorner",value:function(e){this.foundation_.setAnchorCorner(e)}},{key:"setAnchorMargin",value:function(e){this.foundation_.setAnchorMargin(e)}},{key:"getDefaultFoundation",value:function(){var e=this;return new u.b(l({addClass:function(t){return e.root_.classList.add(t)},removeClass:function(t){return e.root_.classList.remove(t)},hasClass:function(t){return e.root_.classList.contains(t)},hasAnchor:function(){return!!e.anchorElement},notifyClose:function(){return e.emit(u.b.strings.CLOSED_EVENT,{})},notifyOpen:function(){return e.emit(u.b.strings.OPENED_EVENT,{})},isElementInContainer:function(t){return e.root_===t||e.root_.contains(t)},isRtl:function(){return"rtl"===getComputedStyle(e.root_).getPropertyValue("direction")},setTransformOrigin:function(t){e.root_.style[a.getTransformPropertyName(window)+"-origin"]=t}},this.getFocusAdapterMethods_(),this.getDimensionAdapterMethods_()))}},{key:"getFocusAdapterMethods_",value:function(){var e=this;return{isFocused:function(){return document.activeElement===e.root_},saveFocus:function(){e.previousFocus_=document.activeElement},restoreFocus:function(){e.root_.contains(document.activeElement)&&e.previousFocus_&&e.previousFocus_.focus&&e.previousFocus_.focus()},isFirstElementFocused:function(){return e.firstFocusableElement_&&e.firstFocusableElement_===document.activeElement},isLastElementFocused:function(){return e.lastFocusableElement_&&e.lastFocusableElement_===document.activeElement},focusFirstElement:function(){return e.firstFocusableElement_&&e.firstFocusableElement_.focus&&e.firstFocusableElement_.focus()},focusLastElement:function(){return e.lastFocusableElement_&&e.lastFocusableElement_.focus&&e.lastFocusableElement_.focus()}}}},{key:"getDimensionAdapterMethods_",value:function(){var e=this;return{getInnerDimensions:function(){return{width:e.root_.offsetWidth,height:e.root_.offsetHeight}},getAnchorDimensions:function(){return e.anchorElement&&e.anchorElement.getBoundingClientRect()},getWindowDimensions:function(){return{width:window.innerWidth,height:window.innerHeight}},getBodyDimensions:function(){return{width:document.body.clientWidth,height:document.body.clientHeight}},getWindowScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},setPosition:function(t){e.root_.style.left="left"in t?t.left:null,e.root_.style.right="right"in t?t.right:null,e.root_.style.top="top"in t?t.top:null,e.root_.style.bottom="bottom"in t?t.bottom:null},setMaxHeight:function(t){e.root_.style.maxHeight=t}}}},{key:"open",get:function(){return this.foundation_.isOpen()},set:function(e){if(e){var t=this.root_.querySelectorAll(c.e.FOCUSABLE_ELEMENTS);this.firstFocusableElement_=t.length>0?t[0]:null,this.lastFocusableElement_=t.length>0?t[t.length-1]:null,this.foundation_.open()}else this.foundation_.close()}},{key:"quickOpen",set:function(e){this.foundation_.setQuickOpen(e)}}],[{key:"attachTo",value:function(e){return new t(e)}}]),t}(s.a)},47:function(e,t,n){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(void 0===o||t){var n=e.document.createElement("div"),i="transform"in n.style?"transform":"webkitTransform";o=i}return o}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"getTransformPropertyName",function(){return i});var o=void 0},62:function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return o});/** | ||
var i={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},o={CLOSED_EVENT:"MDCMenuSurface:closed",OPENED_EVENT:"MDCMenuSurface:opened",FOCUSABLE_ELEMENTS:'button:not(:disabled), [href]:not([aria-disabled="true"]), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'},r={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67},s={BOTTOM:1,CENTER:2,RIGHT:4,FLIP_RTL:8},a={TOP_LEFT:0,TOP_RIGHT:s.RIGHT,BOTTOM_LEFT:s.BOTTOM,BOTTOM_RIGHT:s.BOTTOM|s.RIGHT,TOP_START:s.FLIP_RTL,TOP_END:s.FLIP_RTL|s.RIGHT,BOTTOM_START:s.BOTTOM|s.FLIP_RTL,BOTTOM_END:s.BOTTOM|s.RIGHT|s.FLIP_RTL}},44:function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"MDCMenuSurface",function(){return h});var s=n(1),a=n(45),u=n(29),c=(n(30),n(31));n.d(t,"MDCMenuSurfaceFoundation",function(){return u.b}),n.d(t,"AnchorMargin",function(){return u.a}),n.d(t,"Corner",function(){return c.a}),n.d(t,"CornerBit",function(){return c.b}),n.d(t,"util",function(){return a});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),d=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var s=o.get;if(void 0!==s)return s.call(i)},h=function(e){function t(){var e;i(this,t);for(var n=arguments.length,r=Array(n),s=0;s<n;s++)r[s]=arguments[s];var a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(r)));return a.previousFocus_,a.anchorElement,a.firstFocusableElement_,a.lastFocusableElement_,a.handleKeydown_,a.handleBodyClick_,a.registerBodyClickListener_,a.deregisterBodyClickListener_,a}return r(t,e),f(t,[{key:"initialSyncWithDOM",value:function(){var e=this;this.root_.parentElement&&this.root_.parentElement.classList.contains(c.c.ANCHOR)&&(this.anchorElement=this.root_.parentElement),this.root_.classList.contains(c.c.FIXED)&&this.setFixedPosition(!0),this.handleKeydown_=function(t){return e.foundation_.handleKeydown(t)},this.handleBodyClick_=function(t){return e.foundation_.handleBodyClick(t)},this.registerBodyClickListener_=function(){return document.body.addEventListener("click",e.handleBodyClick_)},this.deregisterBodyClickListener_=function(){return document.body.removeEventListener("click",e.handleBodyClick_)},this.root_.addEventListener("keydown",this.handleKeydown_),this.root_.addEventListener(c.e.OPENED_EVENT,this.registerBodyClickListener_),this.root_.addEventListener(c.e.CLOSED_EVENT,this.deregisterBodyClickListener_)}},{key:"destroy",value:function(){this.root_.removeEventListener("keydown",this.handleKeydown_),this.root_.removeEventListener(c.e.OPENED_EVENT,this.registerBodyClickListener_),this.root_.removeEventListener(c.e.CLOSED_EVENT,this.deregisterBodyClickListener_),d(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"hoistMenuToBody",value:function(){document.body.appendChild(this.root_.parentElement.removeChild(this.root_)),this.setIsHoisted(!0)}},{key:"setIsHoisted",value:function(e){this.foundation_.setIsHoisted(e)}},{key:"setMenuSurfaceAnchorElement",value:function(e){this.anchorElement=e}},{key:"setFixedPosition",value:function(e){e?this.root_.classList.add(c.c.FIXED):this.root_.classList.remove(c.c.FIXED),this.foundation_.setFixedPosition(e)}},{key:"setAbsolutePosition",value:function(e,t){this.foundation_.setAbsolutePosition(e,t),this.setIsHoisted(!0)}},{key:"setAnchorCorner",value:function(e){this.foundation_.setAnchorCorner(e)}},{key:"setAnchorMargin",value:function(e){this.foundation_.setAnchorMargin(e)}},{key:"getDefaultFoundation",value:function(){var e=this;return new u.b(l({addClass:function(t){return e.root_.classList.add(t)},removeClass:function(t){return e.root_.classList.remove(t)},hasClass:function(t){return e.root_.classList.contains(t)},hasAnchor:function(){return!!e.anchorElement},notifyClose:function(){return e.emit(u.b.strings.CLOSED_EVENT,{})},notifyOpen:function(){return e.emit(u.b.strings.OPENED_EVENT,{})},isElementInContainer:function(t){return e.root_===t||e.root_.contains(t)},isRtl:function(){return"rtl"===getComputedStyle(e.root_).getPropertyValue("direction")},setTransformOrigin:function(t){e.root_.style[a.getTransformPropertyName(window)+"-origin"]=t}},this.getFocusAdapterMethods_(),this.getDimensionAdapterMethods_()))}},{key:"getFocusAdapterMethods_",value:function(){var e=this;return{isFocused:function(){return document.activeElement===e.root_},saveFocus:function(){e.previousFocus_=document.activeElement},restoreFocus:function(){e.root_.contains(document.activeElement)&&e.previousFocus_&&e.previousFocus_.focus&&e.previousFocus_.focus()},isFirstElementFocused:function(){return e.firstFocusableElement_&&e.firstFocusableElement_===document.activeElement},isLastElementFocused:function(){return e.lastFocusableElement_&&e.lastFocusableElement_===document.activeElement},focusFirstElement:function(){return e.firstFocusableElement_&&e.firstFocusableElement_.focus&&e.firstFocusableElement_.focus()},focusLastElement:function(){return e.lastFocusableElement_&&e.lastFocusableElement_.focus&&e.lastFocusableElement_.focus()}}}},{key:"getDimensionAdapterMethods_",value:function(){var e=this;return{getInnerDimensions:function(){return{width:e.root_.offsetWidth,height:e.root_.offsetHeight}},getAnchorDimensions:function(){return e.anchorElement&&e.anchorElement.getBoundingClientRect()},getWindowDimensions:function(){return{width:window.innerWidth,height:window.innerHeight}},getBodyDimensions:function(){return{width:document.body.clientWidth,height:document.body.clientHeight}},getWindowScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},setPosition:function(t){e.root_.style.left="left"in t?t.left:null,e.root_.style.right="right"in t?t.right:null,e.root_.style.top="top"in t?t.top:null,e.root_.style.bottom="bottom"in t?t.bottom:null},setMaxHeight:function(t){e.root_.style.maxHeight=t}}}},{key:"open",get:function(){return this.foundation_.isOpen()},set:function(e){if(e){var t=this.root_.querySelectorAll(c.e.FOCUSABLE_ELEMENTS);this.firstFocusableElement_=t.length>0?t[0]:null,this.lastFocusableElement_=t.length>0?t[t.length-1]:null,this.foundation_.open()}else this.foundation_.close()}},{key:"quickOpen",set:function(e){this.foundation_.setQuickOpen(e)}}],[{key:"attachTo",value:function(e){return new t(e)}}]),t}(s.a)},45:function(e,t,n){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(void 0===o||t){var n=e.document.createElement("div"),i="transform"in n.style?"transform":"webkitTransform";o=i}return o}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"getTransformPropertyName",function(){return i});/** | ||
* @license | ||
* Copyright 2018 Google Inc. All Rights Reserved. | ||
* Copyright 2018 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
var o=void 0},64:function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return o});/** | ||
* @license | ||
* Copyright 2018 Google Inc. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
var i={ROOT:"mdc-menu",MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group"},o={SELECTED_EVENT:"MDCMenu:selected",ARIA_SELECTED_ATTR:"aria-selected",LIST_SELECTOR:".mdc-list",CHECKBOX_SELECTOR:'input[type="checkbox"]'}}})}); | ||
//# sourceMappingURL=mdc.menu.min.js.map |
/** | ||
* @license | ||
* Copyright 2018 Google Inc. All Rights Reserved. | ||
* Copyright 2018 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
@@ -17,0 +23,0 @@ |
26
index.js
/** | ||
* @license | ||
* Copyright 2018 Google Inc. All Rights Reserved. | ||
* Copyright 2018 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
@@ -17,0 +23,0 @@ |
{ | ||
"name": "@material/menu", | ||
"version": "0.39.0-0", | ||
"version": "0.39.0", | ||
"description": "The Material Components for the web menu component", | ||
"license": "Apache-2.0", | ||
"license": "MIT", | ||
"keywords": [ | ||
@@ -17,7 +17,7 @@ "material components", | ||
"dependencies": { | ||
"@material/base": "^0.35.0", | ||
"@material/list": "^0.39.0-0", | ||
"@material/menu-surface": "^0.39.0-0", | ||
"@material/rtl": "^0.36.0" | ||
"@material/base": "^0.39.0", | ||
"@material/list": "^0.39.0", | ||
"@material/menu-surface": "^0.39.0", | ||
"@material/rtl": "^0.39.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
222273
3934
- Removed@material/base@0.35.0(transitive)
- Removed@material/rtl@0.36.0(transitive)
Updated@material/base@^0.39.0
Updated@material/list@^0.39.0
Updated@material/rtl@^0.39.0