text: !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("react"),require("classnames"),require("react-dom"));else if("function"==typeof define&&define.amd)define(["react","classnames","react-dom"],e);else{var n="object"==typeof exports?e(require("react"),require("classnames"),require("react-dom")):e(t.react,t.classnames,t["react-dom"]);for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}("undefined"!=typeof self?self:this,function(t,e,n){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=102)}({0:function(e,n){e.exports=t},1:function(t,n){t.exports=e},102:function(t,e,n){"use strict";var o,i=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},s=this&&this.__rest||function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=u(n(0)),c=u(n(103)),l=u(n(1)),f=n(16),h=n(159);e.Corner=h.Corner;var d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.menuSurfaceElement=a.default.createRef(),e.previousFocus=null,e.firstFocusableElement=null,e.lastFocusableElement=null,e.state={transformOrigin:"",maxHeight:void 0,styleLeft:void 0,styleRight:void 0,styleTop:void 0,styleBottom:void 0,classList:new Set,mounted:!1},e.open_=function(){if(e.props.open){if(!e.menuSurfaceElement.current)return;var t=e.menuSurfaceElement.current.querySelectorAll(f.MDCMenuSurfaceFoundation.strings.FOCUSABLE_ELEMENTS);e.firstFocusableElement=t.length>0?t[0]:null,e.lastFocusableElement=t.length>0?t[t.length-1]:null,e.foundation.open()}else e.foundation.close()},e.handleKeydown=function(t){e.props.onKeyDown(t),e.foundation.handleKeydown(t.nativeEvent)},e.handleOpen=function(){e.registerWindowClickListener&&e.registerWindowClickListener()},e.handleClose=function(){e.deregisterWindowClickListener&&e.deregisterWindowClickListener()},e}return i(e,t),e.prototype.componentDidMount=function(){var t=this,e=this.props,n=e.anchorCorner,o=e.anchorMargin,i=e.coordinates,r=e.fixed,s=e.quickOpen;this.handleWindowClick=function(e){return t.foundation.handleBodyClick(e)},this.registerWindowClickListener=function(){return window.addEventListener("click",t.handleWindowClick)},this.deregisterWindowClickListener=function(){return window.removeEventListener("click",t.handleWindowClick)},this.foundation=new f.MDCMenuSurfaceFoundation(this.adapter),this.foundation.init(),this.foundation.setIsHoisted(!0),this.foundation.setFixedPosition(r),i&&this.setCoordinates(),n&&this.foundation.setAnchorCorner(n),o&&this.foundation.setAnchorMargin(o),s&&this.foundation.setQuickOpen(s),this.setState({mounted:!0})},e.prototype.componentDidUpdate=function(t,e){(this.props.open!==t.open||this.props.open&&this.state.mounted!==e.mounted)&&this.open_(),this.props.coordinates!==t.coordinates&&this.setCoordinates(),this.props.anchorCorner!==t.anchorCorner&&this.foundation.setAnchorCorner(this.props.anchorCorner),this.props.anchorMargin!==t.anchorMargin&&this.foundation.setAnchorMargin(this.props.anchorMargin),this.props.quickOpen!==t.quickOpen&&this.foundation.setQuickOpen(this.props.quickOpen),this.state.mounted!==e.mounted&&this.props.onMount&&this.props.onMount(this.state.mounted)},e.prototype.componentWillUnmount=function(){this.deregisterWindowClickListener&&this.deregisterWindowClickListener(),this.foundation&&this.foundation.destroy()},e.prototype.setCoordinates=function(){if(this.props.coordinates){var t=this.props.coordinates,e=t.x,n=t.y;this.foundation.setAbsolutePosition(e,n)}},Object.defineProperty(e.prototype,"classes",{get:function(){var t=this.props,e=t.fixed,n=t.className,o=this.state.classList;return l.default("mdc-menu-surface",Array.from(o),n,{"mdc-menu-surface--fixed":e})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"styles",{get:function(){var t=this.state,e=t.styleLeft,n=t.styleRight,o=t.styleTop,i=t.styleBottom,r=t.transformOrigin,s=t.maxHeight;return Object.assign({},this.props.styles,{transformOrigin:r,maxHeight:s,left:e,right:n,top:o,bottom:i})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"adapter",{get:function(){var t=this;return r({addClass:function(e){var n=new Set(t.state.classList);n.add(e),t.setState({classList:n})},removeClass:function(e){var n=new Set(t.state.classList);n.delete(e),t.setState({classList:n})},hasClass:function(e){return t.classes.split(" ").includes(e)},hasAnchor:function(){return!!t.props.anchorElement},notifyOpen:function(){t.handleOpen(),t.props.onOpen()},notifyClose:function(){t.handleClose(),t.props.onClose()},isElementInContainer:function(e){return!!t.menuSurfaceElement.current&&t.menuSurfaceElement.current.contains(e)},isRtl:function(){return!!t.menuSurfaceElement&&(!!t.menuSurfaceElement.current&&"rtl"===window.getComputedStyle(t.menuSurfaceElement.current).getPropertyValue("direction"))},setTransformOrigin:function(e){return t.setState({transformOrigin:e})}},{isFocused:function(){return t.menuSurfaceElement&&document.activeElement===t.menuSurfaceElement.current},saveFocus:function(){t.previousFocus=document.activeElement},restoreFocus:function(){var e=t.menuSurfaceElement;e&&e.current&&e.current.contains(document.activeElement)&&t.previousFocus&&t.previousFocus.focus&&t.previousFocus.focus()},isFirstElementFocused:function(){return t.firstFocusableElement===document.activeElement},isLastElementFocused:function(){return t.lastFocusableElement===document.activeElement},focusFirstElement:function(){return!!t.firstFocusableElement&&(t.firstFocusableElement.focus&&t.firstFocusableElement.focus())},focusLastElement:function(){return t.lastFocusableElement&&t.lastFocusableElement.focus&&t.lastFocusableElement.focus()}},{getInnerDimensions:function(){var e=t.menuSurfaceElement.current;return e?{width:e.offsetWidth,height:e.offsetHeight}:{width:0,height:0}},getAnchorDimensions:function(){return t.props.anchorElement?t.props.anchorElement.getBoundingClientRect():null},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(e){t.setState(function(t){return Object.assign(t,{styleLeft:"left"in e?e.left:null,styleRight:"right"in e?e.right:null,styleTop:"top"in e?e.top:null,styleBottom:"bottom"in e?e.bottom:null})})},setMaxHeight:function(e){return t.setState({maxHeight:e})}})},enumerable:!0,configurable:!0}),e.prototype.render=function(){var t=this.props,e=(t.anchorCorner,t.anchorElement,t.anchorMargin,t.className,t.coordinates,t.fixed,t.onClose,t.onOpen,t.onKeyDown,t.styles,t.quickOpen,t.onMount,t.children),n=s(t,["anchorCorner","anchorElement","anchorMargin","className","coordinates","fixed","onClose","onOpen","onKeyDown","styles","quickOpen","onMount","children"]);return this.state.mounted?c.default.createPortal(a.default.createElement("div",r({className:this.classes,onKeyDown:this.handleKeydown,ref:this.menuSurfaceElement,style:this.styles},n),e),document.body):null},e.defaultProps={className:"",styles:{},anchorCorner:0,anchorMargin:{},onClose:function(){},onOpen:function(){},onKeyDown:function(){},quickOpen:!1,open:!1,fixed:!1},e}(a.default.Component);e.default=d},103:function(t,e){t.exports=n},15:function(t,e,n){"use strict";n.d(e,"b",function(){return i}),n.d(e,"a",function(){return r}),n.d(e,"d",function(){return s}),n.d(e,"c",function(){return a});"function"==typeof Symbol&&Symbol.iterator;
  /*! *****************************************************************************
  Copyright (c) Microsoft Corporation. All rights reserved.
  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 http://www.apache.org/licenses/LICENSE-2.0
  
  THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
  WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
  MERCHANTABLITY OR NON-INFRINGEMENT.
  
  See the Apache Version 2.0 License for specific language governing permissions
  and limitations under the License.
  ***************************************************************************** */var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var r=function(){return(r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function s(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function u(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,i,r=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(t){i={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}function a(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(u(arguments[e]));return t}},159:function(t,e,n){"use strict";n.r(e);var o,i={};function r(t,e){if(void 0===e&&(e=!1),void 0===o||e){var n=t.document.createElement("div");o="transform"in n.style?"transform":"webkitTransform"}return o}n.r(i),n.d(i,"getTransformPropertyName",function(){return r});var s=n(3),u=n(15),a=n(28),c=function(){function t(t,e){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];this.root_=t,this.initialize.apply(this,u.c(n)),this.foundation_=void 0===e?this.getDefaultFoundation():e,this.foundation_.init(),this.initialSyncWithDOM()}return t.attachTo=function(e){return new t(e,new a.a({}))},t.prototype.initialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},t.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},t.prototype.initialSyncWithDOM=function(){},t.prototype.destroy=function(){this.foundation_.destroy()},t.prototype.listen=function(t,e){this.root_.addEventListener(t,e)},t.prototype.unlisten=function(t,e){this.root_.removeEventListener(t,e)},t.prototype.emit=function(t,e,n){var o;void 0===n&&(n=!1),"function"==typeof CustomEvent?o=new CustomEvent(t,{bubbles:n,detail:e}):(o=document.createEvent("CustomEvent")).initCustomEvent(t,n,!1,e),this.root_.dispatchEvent(o)},t}(),l=n(16),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u.b(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialSyncWithDOM=function(){var t=this,e=this.root_.parentElement;this.anchorElement=e&&e.classList.contains(s.c.ANCHOR)?e:null,this.root_.classList.contains(s.c.FIXED)&&this.setFixedPosition(!0),this.handleKeydown_=function(e){return t.foundation_.handleKeydown(e)},this.handleBodyClick_=function(e){return t.foundation_.handleBodyClick(e)},this.registerBodyClickListener_=function(){return document.body.addEventListener("click",t.handleBodyClick_)},this.deregisterBodyClickListener_=function(){return document.body.removeEventListener("click",t.handleBodyClick_)},this.listen("keydown",this.handleKeydown_),this.listen(s.e.OPENED_EVENT,this.registerBodyClickListener_),this.listen(s.e.CLOSED_EVENT,this.deregisterBodyClickListener_)},e.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown_),this.unlisten(s.e.OPENED_EVENT,this.registerBodyClickListener_),this.unlisten(s.e.CLOSED_EVENT,this.deregisterBodyClickListener_),t.prototype.destroy.call(this)},Object.defineProperty(e.prototype,"open",{get:function(){return this.foundation_.isOpen()},set:function(t){if(t){var e=this.root_.querySelectorAll(s.e.FOCUSABLE_ELEMENTS);this.firstFocusableElement_=e[0],this.lastFocusableElement_=e[e.length-1],this.foundation_.open()}else this.foundation_.close()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"quickOpen",{set:function(t){this.foundation_.setQuickOpen(t)},enumerable:!0,configurable:!0}),e.prototype.hoistMenuToBody=function(){document.body.appendChild(this.root_),this.setIsHoisted(!0)},e.prototype.setIsHoisted=function(t){this.foundation_.setIsHoisted(t)},e.prototype.setMenuSurfaceAnchorElement=function(t){this.anchorElement=t},e.prototype.setFixedPosition=function(t){t?this.root_.classList.add(s.c.FIXED):this.root_.classList.remove(s.c.FIXED),this.foundation_.setFixedPosition(t)},e.prototype.setAbsolutePosition=function(t,e){this.foundation_.setAbsolutePosition(t,e),this.setIsHoisted(!0)},e.prototype.setAnchorCorner=function(t){this.foundation_.setAnchorCorner(t)},e.prototype.setAnchorMargin=function(t){this.foundation_.setAnchorMargin(t)},e.prototype.getDefaultFoundation=function(){var t=this,e={addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},hasClass:function(e){return t.root_.classList.contains(e)},hasAnchor:function(){return!!t.anchorElement},notifyClose:function(){return t.emit(l.MDCMenuSurfaceFoundation.strings.CLOSED_EVENT,{})},notifyOpen:function(){return t.emit(l.MDCMenuSurfaceFoundation.strings.OPENED_EVENT,{})},isElementInContainer:function(e){return t.root_.contains(e)},isRtl:function(){return"rtl"===getComputedStyle(t.root_).getPropertyValue("direction")},setTransformOrigin:function(e){var n=r(window)+"-origin";t.root_.style.setProperty(n,e)},isFocused:function(){return document.activeElement===t.root_},saveFocus:function(){t.previousFocus_=document.activeElement},restoreFocus:function(){t.root_.contains(document.activeElement)&&t.previousFocus_&&t.previousFocus_.focus&&t.previousFocus_.focus()},isFirstElementFocused:function(){return!!t.firstFocusableElement_&&t.firstFocusableElement_===document.activeElement},isLastElementFocused:function(){return!!t.lastFocusableElement_&&t.lastFocusableElement_===document.activeElement},focusFirstElement:function(){return t.firstFocusableElement_&&t.firstFocusableElement_.focus&&t.firstFocusableElement_.focus()},focusLastElement:function(){return t.lastFocusableElement_&&t.lastFocusableElement_.focus&&t.lastFocusableElement_.focus()},getInnerDimensions:function(){return{width:t.root_.offsetWidth,height:t.root_.offsetHeight}},getAnchorDimensions:function(){return t.anchorElement?t.anchorElement.getBoundingClientRect():null},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(e){t.root_.style.left="left"in e?e.left+"px":"",t.root_.style.right="right"in e?e.right+"px":"",t.root_.style.top="top"in e?e.top+"px":"",t.root_.style.bottom="bottom"in e?e.bottom+"px":""},setMaxHeight:function(e){t.root_.style.maxHeight=e}};return new l.MDCMenuSurfaceFoundation(e)},e}(c);n.d(e,"Corner",function(){return s.a}),n.d(e,"CornerBit",function(){return s.b}),n.d(e,"util",function(){return i}),n.d(e,"MDCMenuSurface",function(){return f}),n.d(e,"MDCMenuSurfaceFoundation",function(){return l.MDCMenuSurfaceFoundation})},16:function(t,e,n){"use strict";n.r(e),n.d(e,"MDCMenuSurfaceFoundation",function(){return s});var o=n(15),i=n(28),r=n(3),s=function(t){function e(n){var i=t.call(this,o.a({},e.defaultAdapter,n))||this;return i.isOpen_=!1,i.isQuickOpen_=!1,i.isHoistedElement_=!1,i.isFixedPosition_=!1,i.openAnimationEndTimerId_=0,i.closeAnimationEndTimerId_=0,i.animationRequestId_=0,i.anchorCorner_=r.a.TOP_START,i.anchorMargin_={top:0,right:0,bottom:0,left:0},i.position_={x:0,y:0},i}return o.b(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return r.c},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return r.e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return r.d},enumerable:!0,configurable:!0}),Object.defineProperty(e,"Corner",{get:function(){return r.a},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isFirstElementFocused:function(){return!1},isLastElementFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},focusFirstElement:function(){},focusLastElement:function(){},notifyClose:function(){},notifyOpen:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){var t=e.cssClasses,n=t.ROOT,o=t.OPEN;if(!this.adapter_.hasClass(n))throw new Error(n+" class required in root element.");this.adapter_.hasClass(o)&&(this.isOpen_=!0)},e.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId_),clearTimeout(this.closeAnimationEndTimerId_),cancelAnimationFrame(this.animationRequestId_)},e.prototype.setAnchorCorner=function(t){this.anchorCorner_=t},e.prototype.setAnchorMargin=function(t){this.anchorMargin_.top=t.top||0,this.anchorMargin_.right=t.right||0,this.anchorMargin_.bottom=t.bottom||0,this.anchorMargin_.left=t.left||0},e.prototype.setIsHoisted=function(t){this.isHoistedElement_=t},e.prototype.setFixedPosition=function(t){this.isFixedPosition_=t},e.prototype.setAbsolutePosition=function(t,e){this.position_.x=this.isFinite_(t)?t:0,this.position_.y=this.isFinite_(e)?e:0},e.prototype.setQuickOpen=function(t){this.isQuickOpen_=t},e.prototype.isOpen=function(){return this.isOpen_},e.prototype.open=function(){var t=this;this.adapter_.saveFocus(),this.isQuickOpen_||this.adapter_.addClass(e.cssClasses.ANIMATING_OPEN),this.animationRequestId_=requestAnimationFrame(function(){t.adapter_.addClass(e.cssClasses.OPEN),t.dimensions_=t.adapter_.getInnerDimensions(),t.autoPosition_(),t.isQuickOpen_?t.adapter_.notifyOpen():t.openAnimationEndTimerId_=setTimeout(function(){t.openAnimationEndTimerId_=0,t.adapter_.removeClass(e.cssClasses.ANIMATING_OPEN),t.adapter_.notifyOpen()},r.d.TRANSITION_OPEN_DURATION)}),this.isOpen_=!0},e.prototype.close=function(){var t=this;this.isQuickOpen_||this.adapter_.addClass(e.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){t.adapter_.removeClass(e.cssClasses.OPEN),t.isQuickOpen_?t.adapter_.notifyClose():t.closeAnimationEndTimerId_=setTimeout(function(){t.closeAnimationEndTimerId_=0,t.adapter_.removeClass(e.cssClasses.ANIMATING_CLOSED),t.adapter_.notifyClose()},r.d.TRANSITION_CLOSE_DURATION)}),this.isOpen_=!1,this.maybeRestoreFocus_()},e.prototype.handleBodyClick=function(t){var e=t.target;this.adapter_.isElementInContainer(e)||this.close()},e.prototype.handleKeydown=function(t){var e=t.keyCode,n=t.key,o=t.shiftKey,i="Tab"===n||9===e;"Escape"===n||27===e?this.close():i&&(this.adapter_.isLastElementFocused()&&!o?(this.adapter_.focusFirstElement(),t.preventDefault()):this.adapter_.isFirstElementFocused()&&o&&(this.adapter_.focusLastElement(),t.preventDefault()))},e.prototype.autoPosition_=function(){var t;this.measurements_=this.getAutoLayoutMeasurements_();var e=this.getOriginCorner_(),n=this.getMenuSurfaceMaxHeight_(e),o=this.hasBit_(e,r.b.BOTTOM)?"bottom":"top",i=this.hasBit_(e,r.b.RIGHT)?"right":"left",s=this.getHorizontalOriginOffset_(e),u=this.getVerticalOriginOffset_(e),a=this.measurements_,c=a.anchorSize,l=a.surfaceSize,f=((t={})[i]=s,t[o]=u,t);c.width/l.width>r.d.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(i="center"),(this.isHoistedElement_||this.isFixedPosition_)&&this.adjustPositionForHoistedElement_(f),this.adapter_.setTransformOrigin(i+" "+o),this.adapter_.setPosition(f),this.adapter_.setMaxHeight(n?n+"px":"")},e.prototype.getAutoLayoutMeasurements_=function(){var t=this.adapter_.getAnchorDimensions(),e=this.adapter_.getBodyDimensions(),n=this.adapter_.getWindowDimensions(),o=this.adapter_.getWindowScroll();return t||(t={top:this.position_.y,right:this.position_.x,bottom:this.position_.y,left:this.position_.x,width:0,height:0}),{anchorSize:t,bodySize:e,surfaceSize:this.dimensions_,viewportDistance:{top:t.top,right:n.width-t.right,bottom:n.height-t.bottom,left:t.left},viewportSize:n,windowScroll:o}},e.prototype.getOriginCorner_=function(){var t=r.a.TOP_LEFT,e=this.measurements_,n=e.viewportDistance,o=e.anchorSize,i=e.surfaceSize,s=this.hasBit_(this.anchorCorner_,r.b.BOTTOM),u=s?n.top+o.height+this.anchorMargin_.bottom:n.top+this.anchorMargin_.top,a=s?n.bottom-this.anchorMargin_.bottom:n.bottom+o.height-this.anchorMargin_.top,c=i.height-u,l=i.height-a;l>0&&c<l&&(t=this.setBit_(t,r.b.BOTTOM));var f=this.adapter_.isRtl(),h=this.hasBit_(this.anchorCorner_,r.b.FLIP_RTL),d=this.hasBit_(this.anchorCorner_,r.b.RIGHT),p=d&&!f||!d&&h&&f,m=p?n.left+o.width+this.anchorMargin_.right:n.left+this.anchorMargin_.left,_=p?n.right-this.anchorMargin_.right:n.right+o.width-this.anchorMargin_.left,y=i.width-m,g=i.width-_;return(y<0&&p&&f||d&&!p&&y<0||g>0&&y<g)&&(t=this.setBit_(t,r.b.RIGHT)),t},e.prototype.getMenuSurfaceMaxHeight_=function(t){var n=this.measurements_.viewportDistance,o=0,i=this.hasBit_(t,r.b.BOTTOM),s=this.hasBit_(this.anchorCorner_,r.b.BOTTOM),u=e.numbers.MARGIN_TO_EDGE;return i?(o=n.top+this.anchorMargin_.top-u,s||(o+=this.measurements_.anchorSize.height)):(o=n.bottom-this.anchorMargin_.bottom+this.measurements_.anchorSize.height-u,s&&(o-=this.measurements_.anchorSize.height)),o},e.prototype.getHorizontalOriginOffset_=function(t){var e=this.measurements_.anchorSize,n=this.hasBit_(t,r.b.RIGHT),o=this.hasBit_(this.anchorCorner_,r.b.RIGHT);if(n){var i=o?e.width-this.anchorMargin_.left:this.anchorMargin_.right;return this.isHoistedElement_||this.isFixedPosition_?i-(this.measurements_.viewportSize.width-this.measurements_.bodySize.width):i}return o?e.width-this.anchorMargin_.right:this.anchorMargin_.left},e.prototype.getVerticalOriginOffset_=function(t){var e=this.measurements_.anchorSize,n=this.hasBit_(t,r.b.BOTTOM),o=this.hasBit_(this.anchorCorner_,r.b.BOTTOM);return n?o?e.height-this.anchorMargin_.top:-this.anchorMargin_.bottom:o?e.height+this.anchorMargin_.bottom:this.anchorMargin_.top},e.prototype.adjustPositionForHoistedElement_=function(t){var e,n,i=this.measurements_,r=i.windowScroll,s=i.viewportDistance,u=Object.keys(t);try{for(var a=o.d(u),c=a.next();!c.done;c=a.next()){var l=c.value,f=t[l]||0;f+=s[l],this.isFixedPosition_||("top"===l?f+=r.y:"bottom"===l?f-=r.y:"left"===l?f+=r.x:f-=r.x),t[l]=f}}catch(t){e={error:t}}finally{try{c&&!c.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}},e.prototype.maybeRestoreFocus_=function(){var t=this.adapter_.isFocused(),e=document.activeElement&&this.adapter_.isElementInContainer(document.activeElement);(t||e)&&this.adapter_.restoreFocus()},e.prototype.hasBit_=function(t,e){return Boolean(t&e)},e.prototype.setBit_=function(t,e){return t|e},e.prototype.isFinite_=function(t){return"number"==typeof t&&isFinite(t)},e}(i.a);e.default=s},28:function(t,e,n){"use strict";n.d(e,"a",function(){return o});
  /**
   * @license
   * Copyright 2016 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 o=function(){function t(t){void 0===t&&(t={}),this.adapter_=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}()},3:function(t,e,n){"use strict";n.d(e,"c",function(){return r}),n.d(e,"e",function(){return s}),n.d(e,"d",function(){return u}),n.d(e,"b",function(){return o}),n.d(e,"a",function(){return i});
  /**
   * @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 o,i,r={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"},s={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"])'].join(", ")},u={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67};!function(t){t[t.BOTTOM=1]="BOTTOM",t[t.CENTER=2]="CENTER",t[t.RIGHT=4]="RIGHT",t[t.FLIP_RTL=8]="FLIP_RTL"}(o||(o={})),function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=4]="TOP_RIGHT",t[t.BOTTOM_LEFT=1]="BOTTOM_LEFT",t[t.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",t[t.TOP_START=8]="TOP_START",t[t.TOP_END=12]="TOP_END",t[t.BOTTOM_START=9]="BOTTOM_START",t[t.BOTTOM_END=13]="BOTTOM_END"}(i||(i={}))}})});
  //# sourceMappingURL=menu-surface.js.map