File: /home/zeusxp5/lrliberia.com/wp-content/plugins/post-and-page-builder/assets/dist/settings.min.js
/*! For license information please see settings.min.js.LICENSE.txt */
!function(){var t={5823:function(t){t.exports='<div class="mdc-menu mdc-menu-surface" tabindex="-1"> <ul class="mdc-list" role="menu" aria-hidden="true" aria-orientation="vertical"> <% _.each( options, function ( setting ) { %> <li data-action="<%= setting.name %>" class="mdc-list-item <%= setting.name === selected ? \'mdc-menu-item--selected\' : \'\' %>" role="menuitem"> <span class="mdc-list-item__ripple"></span> <span class="mdc-list-item__text"><%= setting.label %></span> </li> <% } ); %> </ul> </div> '},4713:function(t){t.exports='<div class="bg-control-select <%=name %>-switch boldgrid-control"> <div class="mdc-select mdc-select--filled boldgrid-mdc-select <%= icon || iconOption ? \'mdc-select--with-leading-icon\' : \'\' %>"> <input type="hidden" name="<%=name %>"> <div class="mdc-select__anchor" role="button" aria-haspopup="listbox" aria-expanded="false" aria-labelledby="boldgrid-label boldgrid-selected-text"> <span class="mdc-select__ripple"></span> <span id="<%=name %>-boldgrid-label" class="mdc-floating-label mdc-floating-label--float-above"> <%=label %> </span> <span class="mdc-select__selected-text-container"> <div style="min-width:50px"> <% if ( icon || iconOption ) { %> <img class="mdc-select__icon" src="<%=icon %>"> <% } %> </div> <span id="boldgrid-selected-text" class="mdc-select__selected-text"> <% _.each( settings, function( value ) {\n\t\t\t\t\tif ( value.value === selected ) { %> <%=value.label %> <% } %> <% } ); %> </span> </span> <span class="mdc-select__dropdown-icon"> <svg class="mdc-select__dropdown-icon-graphic" viewBox="7 10 10 5" focusable="false"> <polygon class="mdc-select__dropdown-icon-inactive" stroke="none" fill-rule="evenodd" points="7 10 12 15 17 10"> </polygon> <polygon class="mdc-select__dropdown-icon-active" stroke="none" fill-rule="evenodd" points="7 15 12 10 17 15"> </polygon> </svg> </span> <span class="mdc-line-ripple"></span> </div> <div class="mdc-select__menu mdc-menu mdc-menu-surface"> <ul class="mdc-list" role="listbox" aria-label="Boldgrid Settings listbox"> <% _.each( settings, function( value ) { %> <li class="mdc-list-item <%=value.value === selected ? \'mdc-list-item--selected\' : \'\' %>" aria-selected="<%=value.value === selected ? true : false %>" data-value="<%=value.value %>" role="option"> <span class="mdc-list-item__ripple"></span> <span class="mdc-list-item__text"> <%=value.label %> </span> </li> <% } ); %> </ul> </div> </div> </div>'},5148:function(t){t.exports='<svg xmlns="http://www.w3.org/2000/svg" clip-rule="evenodd" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="1"><g fill="#f95b26"><path d="M31.224 38.994h-17.48c-.87 0-1.652-.706-1.652-1.677v-8.562c0-.883.696-1.677 1.652-1.677h17.48c.87 0 1.653.706 1.653 1.677v8.65c-.087.883-.783 1.589-1.653 1.589zM24.354 22.93H13.571c-.783 0-1.392-.619-1.392-1.413v-9.004c0-.794.609-1.412 1.392-1.412h10.783c.783 0 1.392.618 1.392 1.412v9.004c0 .794-.61 1.412-1.392 1.412z"></path></g><path d="M41.051 47.115H9.396c-3.218 0-5.913-2.737-5.913-6.003V8.982c0-3.265 2.695-6.002 5.913-6.002h31.655c3.218 0 5.914 2.737 5.914 6.003v1.324a1.57 1.57 0 0 1-1.565 1.589 1.57 1.57 0 0 1-1.566-1.59V8.984c0-1.5-1.217-2.737-2.696-2.737H9.396C7.918 6.246 6.7 7.482 6.7 8.983v32.13c0 1.5 1.218 2.736 2.696 2.736h31.655c1.479 0 2.696-1.236 2.696-2.737V25.49c0-1.5-1.217-2.736-2.696-2.736H34.53a1.57 1.57 0 0 1-1.565-1.59 1.57 1.57 0 0 1 1.565-1.588h6.522c3.305 0 5.914 2.736 5.914 6.002v15.624c0 3.177-2.696 5.914-5.914 5.914z" fill="#f95b26"></path></svg>'},5311:function(t){"use strict";t.exports=jQuery}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";var t=n(5311);function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function i(t,n){for(var i=0;i<n.length;i++){var o=n[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,(void 0,r=function(t,n){if("object"!==e(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,"string");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(o.key),"symbol"===e(r)?r:String(r)),o)}var r}var o=function(){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e)}var n,o;return n=e,(o=[{key:"getHTML",value:function(e,n){var i=t('\n\t\t\t<div class="bgppb-banner">\n\t\t\t\t<div class="bgppb-banner__branding">\n\t\t\t\t\t<img src="https://ps.w.org/post-and-page-builder/assets/icon-128x128.png">\n\t\t\t\t\t<div class="version">Version: '.concat(BoldgridEditor.pluginVersion,'</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="bgppb-banner__title">\n\t\t\t\t\t<h1>').concat(e,"</h1>\n\t\t\t\t\t<p>").concat(n,"</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t"));return this.applyBackgroundColor(i,2),i[0].outerHTML}},{key:"applyBackgroundColor",value:function(t,e){BoldgridEditor.adminColors&&t.css("cssText","\n\t\t\t\tbackground-color: ".concat(BoldgridEditor.adminColors.colors[e],";\n\t\t\t\tcolor: ").concat(BoldgridEditor.adminColors.icon_colors.current,";\n\t\t\t"))}}])&&i(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),e}(),r=n(4713),s=n.n(r),a=function(t,e){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},a(t,e)};function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var c=function(){return c=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},c.apply(this,arguments)};function d(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,r=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s}function h(t,e,n){if(n||2===arguments.length)for(var i,o=0,r=e.length;o<r;o++)!i&&o in e||(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))}Object.create,Object.create;var p=function(){function t(t){void 0===t&&(t={}),this.adapter=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),f=function(){function t(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];this.root=t,this.initialize.apply(this,h([],l(n))),this.foundation=void 0===e?this.getDefaultFoundation():e,this.foundation.init(),this.initialSyncWithDOM()}return t.attachTo=function(e){return new t(e,new p({}))},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,n){this.root.addEventListener(t,e,n)},t.prototype.unlisten=function(t,e,n){this.root.removeEventListener(t,e,n)},t.prototype.emit=function(t,e,n){var i;void 0===n&&(n=!1),"function"==typeof CustomEvent?i=new CustomEvent(t,{bubbles:n,detail:e}):(i=document.createEvent("CustomEvent")).initCustomEvent(t,n,!1,e),this.root.dispatchEvent(i)},t}();function m(t,e){if(t.closest)return t.closest(e);for(var n=t;n;){if(E(n,e))return n;n=n.parentElement}return null}function E(t,e){return(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e)}var I,y,g,v,b={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},A=function(t){function e(n){var i=t.call(this,c(c({},e.defaultAdapter),n))||this;return i.shakeAnimationEndHandler=function(){i.handleShakeAnimationEnd()},i}return u(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return b},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler)},e.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler)},e.prototype.getWidth=function(){return this.adapter.getWidth()},e.prototype.shake=function(t){var n=e.cssClasses.LABEL_SHAKE;t?this.adapter.addClass(n):this.adapter.removeClass(n)},e.prototype.float=function(t){var n=e.cssClasses,i=n.LABEL_FLOAT_ABOVE,o=n.LABEL_SHAKE;t?this.adapter.addClass(i):(this.adapter.removeClass(i),this.adapter.removeClass(o))},e.prototype.setRequired=function(t){var n=e.cssClasses.LABEL_REQUIRED;t?this.adapter.addClass(n):this.adapter.removeClass(n)},e.prototype.handleShakeAnimationEnd=function(){var t=e.cssClasses.LABEL_SHAKE;this.adapter.removeClass(t)},e}(p),T=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.attachTo=function(t){return new e(t)},e.prototype.shake=function(t){this.foundation.shake(t)},e.prototype.float=function(t){this.foundation.float(t)},e.prototype.setRequired=function(t){this.foundation.setRequired(t)},e.prototype.getWidth=function(){return this.foundation.getWidth()},e.prototype.getDefaultFoundation=function(){var t=this;return new A({addClass:function(e){return t.root.classList.add(e)},removeClass:function(e){return t.root.classList.remove(e)},getWidth:function(){return function(t){var e=t;if(null!==e.offsetParent)return e.scrollWidth;var n=e.cloneNode(!0);n.style.setProperty("position","absolute"),n.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(n);var i=n.scrollWidth;return document.documentElement.removeChild(n),i}(t.root)},registerInteractionHandler:function(e,n){return t.listen(e,n)},deregisterInteractionHandler:function(e,n){return t.unlisten(e,n)}})},e}(f),S={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},C=function(t){function e(n){var i=t.call(this,c(c({},e.defaultAdapter),n))||this;return i.transitionEndHandler=function(t){i.handleTransitionEnd(t)},i}return u(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return S},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler)},e.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler)},e.prototype.activate=function(){this.adapter.removeClass(S.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(S.LINE_RIPPLE_ACTIVE)},e.prototype.setRippleCenter=function(t){this.adapter.setStyle("transform-origin",t+"px center")},e.prototype.deactivate=function(){this.adapter.addClass(S.LINE_RIPPLE_DEACTIVATING)},e.prototype.handleTransitionEnd=function(t){var e=this.adapter.hasClass(S.LINE_RIPPLE_DEACTIVATING);"opacity"===t.propertyName&&e&&(this.adapter.removeClass(S.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(S.LINE_RIPPLE_DEACTIVATING))},e}(p),O=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.attachTo=function(t){return new e(t)},e.prototype.activate=function(){this.foundation.activate()},e.prototype.deactivate=function(){this.foundation.deactivate()},e.prototype.setRippleCenter=function(t){this.foundation.setRippleCenter(t)},e.prototype.getDefaultFoundation=function(){var t=this;return new C({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)},setStyle:function(e,n){return t.root.style.setProperty(e,n)},registerEventHandler:function(e,n){return t.listen(e,n)},deregisterEventHandler:function(e,n){return t.unlisten(e,n)}})},e}(f),x={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},L={CLOSED_EVENT:"MDCMenuSurface:closed",CLOSING_EVENT:"MDCMenuSurface:closing",OPENED_EVENT:"MDCMenuSurface:opened",OPENING_EVENT:"MDCMenuSurface:opening",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(", ")},R={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67,TOUCH_EVENT_WAIT_MS:30};!function(t){t[t.BOTTOM=1]="BOTTOM",t[t.CENTER=2]="CENTER",t[t.RIGHT=4]="RIGHT",t[t.FLIP_RTL=8]="FLIP_RTL"}(I||(I={})),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"}(y||(y={}));var D={LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_DISABLED_CLASS:"mdc-list-item--disabled",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected",LIST_ITEM_TEXT_CLASS:"mdc-list-item__text",LIST_ITEM_PRIMARY_TEXT_CLASS:"mdc-list-item__primary-text",ROOT:"mdc-list"},N=((g={})[""+D.LIST_ITEM_ACTIVATED_CLASS]="mdc-list-item--activated",g[""+D.LIST_ITEM_CLASS]="mdc-list-item",g[""+D.LIST_ITEM_DISABLED_CLASS]="mdc-list-item--disabled",g[""+D.LIST_ITEM_SELECTED_CLASS]="mdc-list-item--selected",g[""+D.LIST_ITEM_PRIMARY_TEXT_CLASS]="mdc-list-item__primary-text",g[""+D.ROOT]="mdc-list",g),M=((v={})[""+D.LIST_ITEM_ACTIVATED_CLASS]="mdc-deprecated-list-item--activated",v[""+D.LIST_ITEM_CLASS]="mdc-deprecated-list-item",v[""+D.LIST_ITEM_DISABLED_CLASS]="mdc-deprecated-list-item--disabled",v[""+D.LIST_ITEM_SELECTED_CLASS]="mdc-deprecated-list-item--selected",v[""+D.LIST_ITEM_TEXT_CLASS]="mdc-deprecated-list-item__text",v[""+D.LIST_ITEM_PRIMARY_TEXT_CLASS]="mdc-deprecated-list-item__primary-text",v[""+D.ROOT]="mdc-deprecated-list",v),w={ACTION_EVENT:"MDCList:action",SELECTION_CHANGE_EVENT:"MDCList:selectionChange",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-checked="true"]',ARIA_CURRENT:"aria-current",ARIA_DISABLED:"aria-disabled",ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'[role="checkbox"]',ARIA_SELECTED:"aria-selected",ARIA_INTERACTIVE_ROLES_SELECTOR:'[role="listbox"], [role="menu"]',ARIA_MULTI_SELECTABLE_SELECTOR:'[aria-multiselectable="true"]',CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"], input[type="radio"]',CHECKBOX_SELECTOR:'input[type="checkbox"]',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+D.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+D.LIST_ITEM_CLASS+" a,\n ."+M[D.LIST_ITEM_CLASS]+" button:not(:disabled),\n ."+M[D.LIST_ITEM_CLASS]+" a\n ",DEPRECATED_SELECTOR:".mdc-deprecated-list",FOCUSABLE_CHILD_ELEMENTS:"\n ."+D.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+D.LIST_ITEM_CLASS+" a,\n ."+D.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\n .'+D.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled),\n .'+M[D.LIST_ITEM_CLASS]+" button:not(:disabled),\n ."+M[D.LIST_ITEM_CLASS]+" a,\n ."+M[D.LIST_ITEM_CLASS]+' input[type="radio"]:not(:disabled),\n .'+M[D.LIST_ITEM_CLASS]+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]',SELECTED_ITEM_SELECTOR:'[aria-selected="true"], [aria-current="true"]'},P={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300},F={UNKNOWN:"Unknown",BACKSPACE:"Backspace",ENTER:"Enter",SPACEBAR:"Spacebar",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",END:"End",HOME:"Home",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown",DELETE:"Delete",ESCAPE:"Escape",TAB:"Tab"},B=new Set;B.add(F.BACKSPACE),B.add(F.ENTER),B.add(F.SPACEBAR),B.add(F.PAGE_UP),B.add(F.PAGE_DOWN),B.add(F.END),B.add(F.HOME),B.add(F.ARROW_LEFT),B.add(F.ARROW_UP),B.add(F.ARROW_RIGHT),B.add(F.ARROW_DOWN),B.add(F.DELETE),B.add(F.ESCAPE),B.add(F.TAB);var H=new Map;H.set(8,F.BACKSPACE),H.set(13,F.ENTER),H.set(32,F.SPACEBAR),H.set(33,F.PAGE_UP),H.set(34,F.PAGE_DOWN),H.set(35,F.END),H.set(36,F.HOME),H.set(37,F.ARROW_LEFT),H.set(38,F.ARROW_UP),H.set(39,F.ARROW_RIGHT),H.set(40,F.ARROW_DOWN),H.set(46,F.DELETE),H.set(27,F.ESCAPE),H.set(9,F.TAB);var k=new Set;function V(t){var e=t.key;return B.has(e)?e:H.get(t.keyCode)||F.UNKNOWN}k.add(F.PAGE_UP),k.add(F.PAGE_DOWN),k.add(F.END),k.add(F.HOME),k.add(F.ARROW_LEFT),k.add(F.ARROW_UP),k.add(F.ARROW_RIGHT),k.add(F.ARROW_DOWN);var U=["input","button","textarea","select"],j=function(t){var e=t.target;if(e){var n=(""+e.tagName).toLowerCase();-1===U.indexOf(n)&&t.preventDefault()}};function G(t,e){var n,i=t.nextChar,o=t.focusItemAtIndex,r=t.sortedIndexByFirstChar,s=t.focusedItemIndex,a=t.skipFocus,u=t.isItemAtIndexDisabled;return clearTimeout(e.bufferClearTimeout),e.bufferClearTimeout=setTimeout((function(){X(e)}),P.TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS),e.typeaheadBuffer=e.typeaheadBuffer+i,n=1===e.typeaheadBuffer.length?function(t,e,n,i){var o=i.typeaheadBuffer[0],r=t.get(o);if(!r)return-1;if(o===i.currentFirstChar&&r[i.sortedIndexCursor].index===e){i.sortedIndexCursor=(i.sortedIndexCursor+1)%r.length;var s=r[i.sortedIndexCursor].index;if(!n(s))return s}i.currentFirstChar=o;var a,u=-1;for(a=0;a<r.length;a++)if(!n(r[a].index)){u=a;break}for(;a<r.length;a++)if(r[a].index>e&&!n(r[a].index)){u=a;break}return-1!==u?(i.sortedIndexCursor=u,r[i.sortedIndexCursor].index):-1}(r,s,u,e):function(t,e,n){var i=n.typeaheadBuffer[0],o=t.get(i);if(!o)return-1;var r=o[n.sortedIndexCursor];if(0===r.text.lastIndexOf(n.typeaheadBuffer,0)&&!e(r.index))return r.index;for(var s=(n.sortedIndexCursor+1)%o.length,a=-1;s!==n.sortedIndexCursor;){var u=o[s],c=0===u.text.lastIndexOf(n.typeaheadBuffer,0),d=!e(u.index);if(c&&d){a=s;break}s=(s+1)%o.length}return-1!==a?(n.sortedIndexCursor=a,o[n.sortedIndexCursor].index):-1}(r,u,e),-1===n||a||o(n),n}function W(t){return t.typeaheadBuffer.length>0}function X(t){t.typeaheadBuffer=""}function q(t,e){var n=t.event,i=t.isTargetListItem,o=t.focusedItemIndex,r=t.focusItemAtIndex,s=t.sortedIndexByFirstChar,a=t.isItemAtIndexDisabled,u="ArrowLeft"===V(n),c="ArrowUp"===V(n),d="ArrowRight"===V(n),l="ArrowDown"===V(n),h="Home"===V(n),p="End"===V(n),f="Enter"===V(n),m="Spacebar"===V(n);return n.altKey||n.ctrlKey||n.metaKey||u||c||d||l||h||p||f?-1:m||1!==n.key.length?m?(i&&j(n),i&&W(e)?G({focusItemAtIndex:r,focusedItemIndex:o,nextChar:" ",sortedIndexByFirstChar:s,skipFocus:!1,isItemAtIndexDisabled:a},e):-1):-1:(j(n),G({focusItemAtIndex:r,focusedItemIndex:o,nextChar:n.key.toLowerCase(),sortedIndexByFirstChar:s,skipFocus:!1,isItemAtIndexDisabled:a},e))}var z=["Alt","Control","Meta","Shift"];function K(t){var e=new Set(t?z.filter((function(e){return t.getModifierState(e)})):[]);return function(t){return t.every((function(t){return e.has(t)}))&&t.length===e.size}}var $=function(t){function e(n){var i=t.call(this,c(c({},e.defaultAdapter),n))||this;return i.wrapFocus=!1,i.isVertical=!0,i.isSingleSelectionList=!1,i.areDisabledItemsFocusable=!0,i.selectedIndex=P.UNSET_INDEX,i.focusedItemIndex=P.UNSET_INDEX,i.useActivatedClass=!1,i.useSelectedAttr=!1,i.ariaCurrentAttrValue=null,i.isCheckboxList=!1,i.isRadioList=!1,i.lastSelectedIndex=null,i.hasTypeahead=!1,i.typeaheadState={bufferClearTimeout:0,currentFirstChar:"",sortedIndexCursor:0,typeaheadBuffer:""},i.sortedIndexByFirstChar=new Map,i}return u(e,t),Object.defineProperty(e,"strings",{get:function(){return w},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return D},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return P},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClassForElementIndex:function(){},focusItemAtIndex:function(){},getAttributeForElementIndex:function(){return null},getFocusedElementIndex:function(){return 0},getListItemCount:function(){return 0},hasCheckboxAtIndex:function(){return!1},hasRadioAtIndex:function(){return!1},isCheckboxCheckedAtIndex:function(){return!1},isFocusInsideList:function(){return!1},isRootFocused:function(){return!1},listItemAtIndexHasClass:function(){return!1},notifyAction:function(){},notifySelectionChange:function(){},removeClassForElementIndex:function(){},setAttributeForElementIndex:function(){},setCheckedCheckboxOrRadioAtIndex:function(){},setTabIndexForListItemChildren:function(){},getPrimaryTextAtIndex:function(){return""}}},enumerable:!1,configurable:!0}),e.prototype.layout=function(){0!==this.adapter.getListItemCount()&&(this.adapter.hasCheckboxAtIndex(0)?this.isCheckboxList=!0:this.adapter.hasRadioAtIndex(0)?this.isRadioList=!0:this.maybeInitializeSingleSelection(),this.hasTypeahead&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex()))},e.prototype.getFocusedItemIndex=function(){return this.focusedItemIndex},e.prototype.setWrapFocus=function(t){this.wrapFocus=t},e.prototype.setVerticalOrientation=function(t){this.isVertical=t},e.prototype.setSingleSelection=function(t){this.isSingleSelectionList=t,t&&(this.maybeInitializeSingleSelection(),this.selectedIndex=this.getSelectedIndexFromDOM())},e.prototype.setDisabledItemsFocusable=function(t){this.areDisabledItemsFocusable=t},e.prototype.maybeInitializeSingleSelection=function(){var t=this.getSelectedIndexFromDOM();t!==P.UNSET_INDEX&&(this.adapter.listItemAtIndexHasClass(t,D.LIST_ITEM_ACTIVATED_CLASS)&&this.setUseActivatedClass(!0),this.isSingleSelectionList=!0,this.selectedIndex=t)},e.prototype.getSelectedIndexFromDOM=function(){for(var t=P.UNSET_INDEX,e=this.adapter.getListItemCount(),n=0;n<e;n++){var i=this.adapter.listItemAtIndexHasClass(n,D.LIST_ITEM_SELECTED_CLASS),o=this.adapter.listItemAtIndexHasClass(n,D.LIST_ITEM_ACTIVATED_CLASS);if(i||o){t=n;break}}return t},e.prototype.setHasTypeahead=function(t){this.hasTypeahead=t,t&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex())},e.prototype.isTypeaheadInProgress=function(){return this.hasTypeahead&&W(this.typeaheadState)},e.prototype.setUseActivatedClass=function(t){this.useActivatedClass=t},e.prototype.setUseSelectedAttribute=function(t){this.useSelectedAttr=t},e.prototype.getSelectedIndex=function(){return this.selectedIndex},e.prototype.setSelectedIndex=function(t,e){void 0===e&&(e={}),this.isIndexValid(t)&&(this.isCheckboxList?this.setCheckboxAtIndex(t,e):this.isRadioList?this.setRadioAtIndex(t,e):this.setSingleSelectionAtIndex(t,e))},e.prototype.handleFocusIn=function(t){t>=0&&(this.focusedItemIndex=t,this.adapter.setAttributeForElementIndex(t,"tabindex","0"),this.adapter.setTabIndexForListItemChildren(t,"0"))},e.prototype.handleFocusOut=function(t){var e=this;t>=0&&(this.adapter.setAttributeForElementIndex(t,"tabindex","-1"),this.adapter.setTabIndexForListItemChildren(t,"-1")),setTimeout((function(){e.adapter.isFocusInsideList()||e.setTabindexToFirstSelectedOrFocusedItem()}),0)},e.prototype.isIndexDisabled=function(t){return this.adapter.listItemAtIndexHasClass(t,D.LIST_ITEM_DISABLED_CLASS)},e.prototype.handleKeydown=function(t,e,n){var i,o=this,r="ArrowLeft"===V(t),s="ArrowUp"===V(t),a="ArrowRight"===V(t),u="ArrowDown"===V(t),c="Home"===V(t),d="End"===V(t),l="Enter"===V(t),h="Spacebar"===V(t),p=this.isVertical&&u||!this.isVertical&&a,f=this.isVertical&&s||!this.isVertical&&r,m="A"===t.key||"a"===t.key,E=K(t);if(this.adapter.isRootFocused())(f||d)&&E([])?(t.preventDefault(),this.focusLastElement()):(p||c)&&E([])?(t.preventDefault(),this.focusFirstElement()):f&&E(["Shift"])&&this.isCheckboxList?(t.preventDefault(),-1!==(y=this.focusLastElement())&&this.setSelectedIndexOnAction(y,!1)):p&&E(["Shift"])&&this.isCheckboxList&&(t.preventDefault(),-1!==(y=this.focusFirstElement())&&this.setSelectedIndexOnAction(y,!1)),this.hasTypeahead&&q({event:t,focusItemAtIndex:function(t){o.focusItemAtIndex(t)},focusedItemIndex:-1,isTargetListItem:e,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(t){return o.isIndexDisabled(t)}},this.typeaheadState);else{var I=this.adapter.getFocusedElementIndex();if(!(-1===I&&(I=n)<0)){if(p&&E([]))j(t),this.focusNextElement(I);else if(f&&E([]))j(t),this.focusPrevElement(I);else if(p&&E(["Shift"])&&this.isCheckboxList)j(t),-1!==(y=this.focusNextElement(I))&&this.setSelectedIndexOnAction(y,!1);else if(f&&E(["Shift"])&&this.isCheckboxList){var y;j(t),-1!==(y=this.focusPrevElement(I))&&this.setSelectedIndexOnAction(y,!1)}else if(c&&E([]))j(t),this.focusFirstElement();else if(d&&E([]))j(t),this.focusLastElement();else if(c&&E(["Control","Shift"])&&this.isCheckboxList){if(j(t),this.isIndexDisabled(I))return;this.focusFirstElement(),this.toggleCheckboxRange(0,I,I)}else if(d&&E(["Control","Shift"])&&this.isCheckboxList){if(j(t),this.isIndexDisabled(I))return;this.focusLastElement(),this.toggleCheckboxRange(I,this.adapter.getListItemCount()-1,I)}else if(m&&E(["Control"])&&this.isCheckboxList)t.preventDefault(),this.checkboxListToggleAll(this.selectedIndex===P.UNSET_INDEX?[]:this.selectedIndex,!0);else if((l||h)&&E([])){if(e){if((g=t.target)&&"A"===g.tagName&&l)return;if(j(t),this.isIndexDisabled(I))return;this.isTypeaheadInProgress()||(this.isSelectableList()&&this.setSelectedIndexOnAction(I,!1),this.adapter.notifyAction(I))}}else if((l||h)&&E(["Shift"])&&this.isCheckboxList){var g;if((g=t.target)&&"A"===g.tagName&&l)return;if(j(t),this.isIndexDisabled(I))return;this.isTypeaheadInProgress()||(this.toggleCheckboxRange(null!==(i=this.lastSelectedIndex)&&void 0!==i?i:I,I,I),this.adapter.notifyAction(I))}this.hasTypeahead&&q({event:t,focusItemAtIndex:function(t){o.focusItemAtIndex(t)},focusedItemIndex:this.focusedItemIndex,isTargetListItem:e,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(t){return o.isIndexDisabled(t)}},this.typeaheadState)}}},e.prototype.handleClick=function(t,e,n){var i,o=K(n);t!==P.UNSET_INDEX&&(this.isIndexDisabled(t)||(o([])?(this.isSelectableList()&&this.setSelectedIndexOnAction(t,e),this.adapter.notifyAction(t)):this.isCheckboxList&&o(["Shift"])&&(this.toggleCheckboxRange(null!==(i=this.lastSelectedIndex)&&void 0!==i?i:t,t,t),this.adapter.notifyAction(t))))},e.prototype.focusNextElement=function(t){var e=this.adapter.getListItemCount(),n=t,i=null;do{if(++n>=e){if(!this.wrapFocus)return t;n=0}if(n===i)return-1;i=null!=i?i:n}while(!this.areDisabledItemsFocusable&&this.isIndexDisabled(n));return this.focusItemAtIndex(n),n},e.prototype.focusPrevElement=function(t){var e=this.adapter.getListItemCount(),n=t,i=null;do{if(--n<0){if(!this.wrapFocus)return t;n=e-1}if(n===i)return-1;i=null!=i?i:n}while(!this.areDisabledItemsFocusable&&this.isIndexDisabled(n));return this.focusItemAtIndex(n),n},e.prototype.focusFirstElement=function(){return this.focusNextElement(-1)},e.prototype.focusLastElement=function(){return this.focusPrevElement(this.adapter.getListItemCount())},e.prototype.focusInitialElement=function(){var t=this.getFirstSelectedOrFocusedItemIndex();return this.focusItemAtIndex(t),t},e.prototype.setEnabled=function(t,e){this.isIndexValid(t,!1)&&(e?(this.adapter.removeClassForElementIndex(t,D.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(t,w.ARIA_DISABLED,"false")):(this.adapter.addClassForElementIndex(t,D.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(t,w.ARIA_DISABLED,"true")))},e.prototype.setSingleSelectionAtIndex=function(t,e){if(void 0===e&&(e={}),this.selectedIndex!==t||e.forceUpdate){var n=D.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass&&(n=D.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex!==P.UNSET_INDEX&&this.adapter.removeClassForElementIndex(this.selectedIndex,n),this.setAriaForSingleSelectionAtIndex(t),this.setTabindexAtIndex(t),t!==P.UNSET_INDEX&&this.adapter.addClassForElementIndex(t,n),this.selectedIndex=t,e.isUserInteraction&&!e.forceUpdate&&this.adapter.notifySelectionChange([t])}},e.prototype.setAriaForSingleSelectionAtIndex=function(t){this.selectedIndex===P.UNSET_INDEX&&(this.ariaCurrentAttrValue=this.adapter.getAttributeForElementIndex(t,w.ARIA_CURRENT));var e=null!==this.ariaCurrentAttrValue,n=e?w.ARIA_CURRENT:w.ARIA_SELECTED;if(this.selectedIndex!==P.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex,n,"false"),t!==P.UNSET_INDEX){var i=e?this.ariaCurrentAttrValue:"true";this.adapter.setAttributeForElementIndex(t,n,i)}},e.prototype.getSelectionAttribute=function(){return this.useSelectedAttr?w.ARIA_SELECTED:w.ARIA_CHECKED},e.prototype.setRadioAtIndex=function(t,e){void 0===e&&(e={});var n=this.getSelectionAttribute();this.adapter.setCheckedCheckboxOrRadioAtIndex(t,!0),(this.selectedIndex!==t||e.forceUpdate)&&(this.selectedIndex!==P.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex,n,"false"),this.adapter.setAttributeForElementIndex(t,n,"true"),this.selectedIndex=t,e.isUserInteraction&&!e.forceUpdate&&this.adapter.notifySelectionChange([t]))},e.prototype.setCheckboxAtIndex=function(t,e){void 0===e&&(e={});for(var n=this.selectedIndex,i=e.isUserInteraction?new Set(n===P.UNSET_INDEX?[]:n):null,o=this.getSelectionAttribute(),r=[],s=0;s<this.adapter.getListItemCount();s++){var a=null==i?void 0:i.has(s),u=t.indexOf(s)>=0;u!==a&&r.push(s),this.adapter.setCheckedCheckboxOrRadioAtIndex(s,u),this.adapter.setAttributeForElementIndex(s,o,u?"true":"false")}this.selectedIndex=t,e.isUserInteraction&&r.length&&this.adapter.notifySelectionChange(r)},e.prototype.toggleCheckboxRange=function(t,e,n){this.lastSelectedIndex=n;for(var i=new Set(this.selectedIndex===P.UNSET_INDEX?[]:this.selectedIndex),o=!(null==i?void 0:i.has(n)),r=l([t,e].sort(),2),s=r[0],a=r[1],u=this.getSelectionAttribute(),c=[],d=s;d<=a;d++)this.isIndexDisabled(d)||o!==i.has(d)&&(c.push(d),this.adapter.setCheckedCheckboxOrRadioAtIndex(d,o),this.adapter.setAttributeForElementIndex(d,u,""+o),o?i.add(d):i.delete(d));c.length&&(this.selectedIndex=h([],l(i)),this.adapter.notifySelectionChange(c))},e.prototype.setTabindexAtIndex=function(t){this.focusedItemIndex===P.UNSET_INDEX&&0!==t?this.adapter.setAttributeForElementIndex(0,"tabindex","-1"):this.focusedItemIndex>=0&&this.focusedItemIndex!==t&&this.adapter.setAttributeForElementIndex(this.focusedItemIndex,"tabindex","-1"),this.selectedIndex instanceof Array||this.selectedIndex===t||this.adapter.setAttributeForElementIndex(this.selectedIndex,"tabindex","-1"),t!==P.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(t,"tabindex","0")},e.prototype.isSelectableList=function(){return this.isSingleSelectionList||this.isCheckboxList||this.isRadioList},e.prototype.setTabindexToFirstSelectedOrFocusedItem=function(){var t=this.getFirstSelectedOrFocusedItemIndex();this.setTabindexAtIndex(t)},e.prototype.getFirstSelectedOrFocusedItemIndex=function(){return this.isSelectableList()?"number"==typeof this.selectedIndex&&this.selectedIndex!==P.UNSET_INDEX?this.selectedIndex:this.selectedIndex instanceof Array&&this.selectedIndex.length>0?this.selectedIndex.reduce((function(t,e){return Math.min(t,e)})):0:Math.max(this.focusedItemIndex,0)},e.prototype.isIndexValid=function(t,e){var n=this;if(void 0===e&&(e=!0),t instanceof Array){if(!this.isCheckboxList&&e)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");return 0===t.length||t.some((function(t){return n.isIndexInRange(t)}))}if("number"==typeof t){if(this.isCheckboxList&&e)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+t);return this.isIndexInRange(t)||this.isSingleSelectionList&&t===P.UNSET_INDEX}return!1},e.prototype.isIndexInRange=function(t){var e=this.adapter.getListItemCount();return t>=0&&t<e},e.prototype.setSelectedIndexOnAction=function(t,e){this.lastSelectedIndex=t,this.isCheckboxList?(this.toggleCheckboxAtIndex(t,e),this.adapter.notifySelectionChange([t])):this.setSelectedIndex(t,{isUserInteraction:!0})},e.prototype.toggleCheckboxAtIndex=function(t,e){var n,i=this.getSelectionAttribute(),o=this.adapter.isCheckboxCheckedAtIndex(t);e?n=o:(n=!o,this.adapter.setCheckedCheckboxOrRadioAtIndex(t,n)),this.adapter.setAttributeForElementIndex(t,i,n?"true":"false");var r=this.selectedIndex===P.UNSET_INDEX?[]:this.selectedIndex.slice();n?r.push(t):r=r.filter((function(e){return e!==t})),this.selectedIndex=r},e.prototype.focusItemAtIndex=function(t){this.adapter.focusItemAtIndex(t),this.focusedItemIndex=t},e.prototype.checkboxListToggleAll=function(t,e){var n=this.adapter.getListItemCount();if(t.length===n)this.setCheckboxAtIndex([],{isUserInteraction:e});else{for(var i=[],o=0;o<n;o++)(!this.isIndexDisabled(o)||t.indexOf(o)>-1)&&i.push(o);this.setCheckboxAtIndex(i,{isUserInteraction:e})}},e.prototype.typeaheadMatchItem=function(t,e,n){var i=this;return void 0===n&&(n=!1),G({focusItemAtIndex:function(t){i.focusItemAtIndex(t)},focusedItemIndex:e||this.focusedItemIndex,nextChar:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:n,isItemAtIndexDisabled:function(t){return i.isIndexDisabled(t)}},this.typeaheadState)},e.prototype.typeaheadInitSortedIndex=function(){return function(t,e){for(var n=new Map,i=0;i<t;i++){var o=e(i).trim();if(o){var r=o[0].toLowerCase();n.has(r)||n.set(r,[]),n.get(r).push({text:o.toLowerCase(),index:i})}}return n.forEach((function(t){t.sort((function(t,e){return t.index-e.index}))})),n}(this.adapter.getListItemCount(),this.adapter.getPrimaryTextAtIndex)},e.prototype.clearTypeaheadBuffer=function(){X(this.typeaheadState)},e}(p),Q=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),Object.defineProperty(e.prototype,"vertical",{set:function(t){this.foundation.setVerticalOrientation(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"listElements",{get:function(){return Array.from(this.root.querySelectorAll("."+this.classNameMap[D.LIST_ITEM_CLASS]))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wrapFocus",{set:function(t){this.foundation.setWrapFocus(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"typeaheadInProgress",{get:function(){return this.foundation.isTypeaheadInProgress()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasTypeahead",{set:function(t){this.foundation.setHasTypeahead(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"singleSelection",{set:function(t){this.foundation.setSingleSelection(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabledItemsFocusable",{set:function(t){this.foundation.setDisabledItemsFocusable(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectedIndex",{get:function(){return this.foundation.getSelectedIndex()},set:function(t){this.foundation.setSelectedIndex(t)},enumerable:!1,configurable:!0}),e.attachTo=function(t){return new e(t)},e.prototype.initialSyncWithDOM=function(){this.isEvolutionEnabled="evolution"in this.root.dataset,this.isEvolutionEnabled?this.classNameMap=N:E(this.root,w.DEPRECATED_SELECTOR)?this.classNameMap=M:this.classNameMap=Object.values(D).reduce((function(t,e){return t[e]=e,t}),{}),this.handleClick=this.handleClickEvent.bind(this),this.handleKeydown=this.handleKeydownEvent.bind(this),this.focusInEventListener=this.handleFocusInEvent.bind(this),this.focusOutEventListener=this.handleFocusOutEvent.bind(this),this.listen("keydown",this.handleKeydown),this.listen("click",this.handleClick),this.listen("focusin",this.focusInEventListener),this.listen("focusout",this.focusOutEventListener),this.layout(),this.initializeListType(),this.ensureFocusable()},e.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown),this.unlisten("click",this.handleClick),this.unlisten("focusin",this.focusInEventListener),this.unlisten("focusout",this.focusOutEventListener)},e.prototype.layout=function(){var t=this.root.getAttribute(w.ARIA_ORIENTATION);this.vertical=t!==w.ARIA_ORIENTATION_HORIZONTAL;var e="."+this.classNameMap[D.LIST_ITEM_CLASS]+":not([tabindex])",n=w.FOCUSABLE_CHILD_ELEMENTS,i=this.root.querySelectorAll(e);i.length&&Array.prototype.forEach.call(i,(function(t){t.setAttribute("tabindex","-1")}));var o=this.root.querySelectorAll(n);o.length&&Array.prototype.forEach.call(o,(function(t){t.setAttribute("tabindex","-1")})),this.isEvolutionEnabled&&this.foundation.setUseSelectedAttribute(!0),this.foundation.layout()},e.prototype.getPrimaryText=function(t){var e,n=t.querySelector("."+this.classNameMap[D.LIST_ITEM_PRIMARY_TEXT_CLASS]);if(this.isEvolutionEnabled||n)return null!==(e=null==n?void 0:n.textContent)&&void 0!==e?e:"";var i=t.querySelector("."+this.classNameMap[D.LIST_ITEM_TEXT_CLASS]);return i&&i.textContent||""},e.prototype.initializeListType=function(){var t=this;if(this.isInteractive=E(this.root,w.ARIA_INTERACTIVE_ROLES_SELECTOR),this.isEvolutionEnabled&&this.isInteractive){var e=Array.from(this.root.querySelectorAll(w.SELECTED_ITEM_SELECTOR),(function(e){return t.listElements.indexOf(e)}));E(this.root,w.ARIA_MULTI_SELECTABLE_SELECTOR)?this.selectedIndex=e:e.length>0&&(this.selectedIndex=e[0])}else{var n=this.root.querySelectorAll(w.ARIA_ROLE_CHECKBOX_SELECTOR),i=this.root.querySelector(w.ARIA_CHECKED_RADIO_SELECTOR);if(n.length){var o=this.root.querySelectorAll(w.ARIA_CHECKED_CHECKBOX_SELECTOR);this.selectedIndex=Array.from(o,(function(e){return t.listElements.indexOf(e)}))}else i&&(this.selectedIndex=this.listElements.indexOf(i))}},e.prototype.setEnabled=function(t,e){this.foundation.setEnabled(t,e)},e.prototype.typeaheadMatchItem=function(t,e){return this.foundation.typeaheadMatchItem(t,e,!0)},e.prototype.getDefaultFoundation=function(){var t=this;return new $({addClassForElementIndex:function(e,n){var i=t.listElements[e];i&&i.classList.add(t.classNameMap[n])},focusItemAtIndex:function(e){var n=t.listElements[e];n&&n.focus()},getAttributeForElementIndex:function(e,n){return t.listElements[e].getAttribute(n)},getFocusedElementIndex:function(){return t.listElements.indexOf(document.activeElement)},getListItemCount:function(){return t.listElements.length},getPrimaryTextAtIndex:function(e){return t.getPrimaryText(t.listElements[e])},hasCheckboxAtIndex:function(e){return!!t.listElements[e].querySelector(w.CHECKBOX_SELECTOR)},hasRadioAtIndex:function(e){return!!t.listElements[e].querySelector(w.RADIO_SELECTOR)},isCheckboxCheckedAtIndex:function(e){return t.listElements[e].querySelector(w.CHECKBOX_SELECTOR).checked},isFocusInsideList:function(){return t.root!==document.activeElement&&t.root.contains(document.activeElement)},isRootFocused:function(){return document.activeElement===t.root},listItemAtIndexHasClass:function(e,n){return t.listElements[e].classList.contains(t.classNameMap[n])},notifyAction:function(e){t.emit(w.ACTION_EVENT,{index:e},!0)},notifySelectionChange:function(e){t.emit(w.SELECTION_CHANGE_EVENT,{changedIndices:e},!0)},removeClassForElementIndex:function(e,n){var i=t.listElements[e];i&&i.classList.remove(t.classNameMap[n])},setAttributeForElementIndex:function(e,n,i){var o=t.listElements[e];o&&o.setAttribute(n,i)},setCheckedCheckboxOrRadioAtIndex:function(e,n){var i=t.listElements[e].querySelector(w.CHECKBOX_RADIO_SELECTOR);i.checked=n;var o=document.createEvent("Event");o.initEvent("change",!0,!0),i.dispatchEvent(o)},setTabIndexForListItemChildren:function(e,n){var i=t.listElements[e],o=w.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX;Array.prototype.forEach.call(i.querySelectorAll(o),(function(t){t.setAttribute("tabindex",n)}))}})},e.prototype.ensureFocusable=function(){if(this.isEvolutionEnabled&&this.isInteractive&&!this.root.querySelector("."+this.classNameMap[D.LIST_ITEM_CLASS]+'[tabindex="0"]')){var t=this.initialFocusIndex();-1!==t&&(this.listElements[t].tabIndex=0)}},e.prototype.initialFocusIndex=function(){if(this.selectedIndex instanceof Array&&this.selectedIndex.length>0)return this.selectedIndex[0];if("number"==typeof this.selectedIndex&&this.selectedIndex!==P.UNSET_INDEX)return this.selectedIndex;var t=this.root.querySelector("."+this.classNameMap[D.LIST_ITEM_CLASS]+":not(."+this.classNameMap[D.LIST_ITEM_DISABLED_CLASS]+")");return null===t?-1:this.getListItemIndex(t)},e.prototype.getListItemIndex=function(t){var e=m(t,"."+this.classNameMap[D.LIST_ITEM_CLASS]+", ."+this.classNameMap[D.ROOT]);return e&&E(e,"."+this.classNameMap[D.LIST_ITEM_CLASS])?this.listElements.indexOf(e):-1},e.prototype.handleFocusInEvent=function(t){var e=this.getListItemIndex(t.target);this.foundation.handleFocusIn(e)},e.prototype.handleFocusOutEvent=function(t){var e=this.getListItemIndex(t.target);this.foundation.handleFocusOut(e)},e.prototype.handleKeydownEvent=function(t){var e=this.getListItemIndex(t.target),n=t.target;this.foundation.handleKeydown(t,n.classList.contains(this.classNameMap[D.LIST_ITEM_CLASS]),e)},e.prototype.handleClickEvent=function(t){var e=this.getListItemIndex(t.target),n=!E(t.target,w.CHECKBOX_RADIO_SELECTOR);this.foundation.handleClick(e,n,t)},e}(f),Y=function(t){function e(n){var i=t.call(this,c(c({},e.defaultAdapter),n))||this;return i.isSurfaceOpen=!1,i.isQuickOpen=!1,i.isHoistedElement=!1,i.isFixedPosition=!1,i.isHorizontallyCenteredOnViewport=!1,i.maxHeight=0,i.openBottomBias=0,i.openAnimationEndTimerId=0,i.closeAnimationEndTimerId=0,i.animationRequestId=0,i.anchorCorner=y.TOP_START,i.originCorner=y.TOP_START,i.anchorMargin={top:0,right:0,bottom:0,left:0},i.position={x:0,y:0},i}return u(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return x},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return L},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return R},enumerable:!1,configurable:!0}),Object.defineProperty(e,"Corner",{get:function(){return y},enumerable:!1,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},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(){},notifyClose:function(){},notifyClosing:function(){},notifyOpen:function(){},notifyOpening:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=e.cssClasses,n=t.ROOT,i=t.OPEN;if(!this.adapter.hasClass(n))throw new Error(n+" class required in root element.");this.adapter.hasClass(i)&&(this.isSurfaceOpen=!0)},e.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},e.prototype.setAnchorCorner=function(t){this.anchorCorner=t},e.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^I.RIGHT},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.isFixed=function(){return this.isFixedPosition},e.prototype.setAbsolutePosition=function(t,e){this.position.x=this.isFinite(t)?t:0,this.position.y=this.isFinite(e)?e:0},e.prototype.setIsHorizontallyCenteredOnViewport=function(t){this.isHorizontallyCenteredOnViewport=t},e.prototype.setQuickOpen=function(t){this.isQuickOpen=t},e.prototype.setMaxHeight=function(t){this.maxHeight=t},e.prototype.setOpenBottomBias=function(t){this.openBottomBias=t},e.prototype.isOpen=function(){return this.isSurfaceOpen},e.prototype.open=function(){var t=this;this.isSurfaceOpen||(this.adapter.notifyOpening(),this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(e.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(e.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame((function(){t.dimensions=t.adapter.getInnerDimensions(),t.autoposition(),t.adapter.addClass(e.cssClasses.OPEN),t.openAnimationEndTimerId=setTimeout((function(){t.openAnimationEndTimerId=0,t.adapter.removeClass(e.cssClasses.ANIMATING_OPEN),t.adapter.notifyOpen()}),R.TRANSITION_OPEN_DURATION)})),this.isSurfaceOpen=!0))},e.prototype.close=function(t){var n=this;if(void 0===t&&(t=!1),this.isSurfaceOpen){if(this.adapter.notifyClosing(),this.isQuickOpen)return this.isSurfaceOpen=!1,t||this.maybeRestoreFocus(),this.adapter.removeClass(e.cssClasses.OPEN),this.adapter.removeClass(e.cssClasses.IS_OPEN_BELOW),void this.adapter.notifyClose();this.adapter.addClass(e.cssClasses.ANIMATING_CLOSED),requestAnimationFrame((function(){n.adapter.removeClass(e.cssClasses.OPEN),n.adapter.removeClass(e.cssClasses.IS_OPEN_BELOW),n.closeAnimationEndTimerId=setTimeout((function(){n.closeAnimationEndTimerId=0,n.adapter.removeClass(e.cssClasses.ANIMATING_CLOSED),n.adapter.notifyClose()}),R.TRANSITION_CLOSE_DURATION)})),this.isSurfaceOpen=!1,t||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;("Escape"===t.key||27===e)&&this.close()},e.prototype.autoposition=function(){var t;this.measurements=this.getAutoLayoutmeasurements();var n=this.getoriginCorner(),i=this.getMenuSurfaceMaxHeight(n),o=this.hasBit(n,I.BOTTOM)?"bottom":"top",r=this.hasBit(n,I.RIGHT)?"right":"left",s=this.getHorizontalOriginOffset(n),a=this.getVerticalOriginOffset(n),u=this.measurements,c=u.anchorSize,d=u.surfaceSize,l=((t={})[r]=s,t[o]=a,t);c.width/d.width>R.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(r="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(l),this.adapter.setTransformOrigin(r+" "+o),this.adapter.setPosition(l),this.adapter.setMaxHeight(i?i+"px":""),this.hasBit(n,I.BOTTOM)||this.adapter.addClass(e.cssClasses.IS_OPEN_BELOW)},e.prototype.getAutoLayoutmeasurements=function(){var t=this.adapter.getAnchorDimensions(),e=this.adapter.getBodyDimensions(),n=this.adapter.getWindowDimensions(),i=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:i}},e.prototype.getoriginCorner=function(){var t,n,i=this.originCorner,o=this.measurements,r=o.viewportDistance,s=o.anchorSize,a=o.surfaceSize,u=e.numbers.MARGIN_TO_EDGE;this.hasBit(this.anchorCorner,I.BOTTOM)?(t=r.top-u+this.anchorMargin.bottom,n=r.bottom-u-this.anchorMargin.bottom):(t=r.top-u+this.anchorMargin.top,n=r.bottom-u+s.height-this.anchorMargin.top),!(n-a.height>0)&&t>n+this.openBottomBias&&(i=this.setBit(i,I.BOTTOM));var c,d,l,h=this.adapter.isRtl(),p=this.hasBit(this.anchorCorner,I.FLIP_RTL),f=this.hasBit(this.anchorCorner,I.RIGHT)||this.hasBit(i,I.RIGHT);(l=h&&p?!f:f)?(c=r.left+s.width+this.anchorMargin.right,d=r.right-this.anchorMargin.right):(c=r.left+this.anchorMargin.left,d=r.right+s.width-this.anchorMargin.left);var m=c-a.width>0,E=d-a.width>0,y=this.hasBit(i,I.FLIP_RTL)&&this.hasBit(i,I.RIGHT);return E&&y&&h||!m&&y?i=this.unsetBit(i,I.RIGHT):(m&&l&&h||m&&!l&&f||!E&&c>=d)&&(i=this.setBit(i,I.RIGHT)),i},e.prototype.getMenuSurfaceMaxHeight=function(t){if(this.maxHeight>0)return this.maxHeight;var n=this.measurements.viewportDistance,i=0,o=this.hasBit(t,I.BOTTOM),r=this.hasBit(this.anchorCorner,I.BOTTOM),s=e.numbers.MARGIN_TO_EDGE;return o?(i=n.top+this.anchorMargin.top-s,r||(i+=this.measurements.anchorSize.height)):(i=n.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-s,r&&(i-=this.measurements.anchorSize.height)),i},e.prototype.getHorizontalOriginOffset=function(t){var e=this.measurements.anchorSize,n=this.hasBit(t,I.RIGHT),i=this.hasBit(this.anchorCorner,I.RIGHT);if(n){var o=i?e.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?o-(this.measurements.viewportSize.width-this.measurements.bodySize.width):o}return i?e.width-this.anchorMargin.right:this.anchorMargin.left},e.prototype.getVerticalOriginOffset=function(t){var e=this.measurements.anchorSize,n=this.hasBit(t,I.BOTTOM),i=this.hasBit(this.anchorCorner,I.BOTTOM);return n?i?e.height-this.anchorMargin.top:-this.anchorMargin.bottom:i?e.height+this.anchorMargin.bottom:this.anchorMargin.top},e.prototype.adjustPositionForHoistedElement=function(t){var e,n,i=this.measurements,o=i.windowScroll,r=i.viewportDistance,s=i.surfaceSize,a=i.viewportSize,u=Object.keys(t);try{for(var c=d(u),l=c.next();!l.done;l=c.next()){var h=l.value,p=t[h]||0;!this.isHorizontallyCenteredOnViewport||"left"!==h&&"right"!==h?(p+=r[h],this.isFixedPosition||("top"===h?p+=o.y:"bottom"===h?p-=o.y:"left"===h?p+=o.x:p-=o.x),t[h]=p):t[h]=(a.width-s.width)/2}}catch(t){e={error:t}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}},e.prototype.maybeRestoreFocus=function(){var t=this,e=this.adapter.isFocused(),n=this.adapter.getOwnerDocument?this.adapter.getOwnerDocument():document,i=n.activeElement&&this.adapter.isElementInContainer(n.activeElement);(e||i)&&setTimeout((function(){t.adapter.restoreFocus()}),R.TOUCH_EVENT_WAIT_MS)},e.prototype.hasBit=function(t,e){return Boolean(t&e)},e.prototype.setBit=function(t,e){return t|e},e.prototype.unsetBit=function(t,e){return t^e},e.prototype.isFinite=function(t){return"number"==typeof t&&isFinite(t)},e}(p),Z={animation:{prefixed:"-webkit-animation",standard:"animation"},transform:{prefixed:"-webkit-transform",standard:"transform"},transition:{prefixed:"-webkit-transition",standard:"transition"}};var J,tt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(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(x.ANCHOR)?e:null,this.root.classList.contains(x.FIXED)&&this.setFixedPosition(!0),this.handleKeydown=function(e){t.foundation.handleKeydown(e)},this.handleBodyClick=function(e){t.foundation.handleBodyClick(e)},this.registerBodyClickListener=function(){document.body.addEventListener("click",t.handleBodyClick,{capture:!0})},this.deregisterBodyClickListener=function(){document.body.removeEventListener("click",t.handleBodyClick,{capture:!0})},this.listen("keydown",this.handleKeydown),this.listen(L.OPENED_EVENT,this.registerBodyClickListener),this.listen(L.CLOSED_EVENT,this.deregisterBodyClickListener)},e.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown),this.unlisten(L.OPENED_EVENT,this.registerBodyClickListener),this.unlisten(L.CLOSED_EVENT,this.deregisterBodyClickListener),t.prototype.destroy.call(this)},e.prototype.isOpen=function(){return this.foundation.isOpen()},e.prototype.open=function(){this.foundation.open()},e.prototype.close=function(t){void 0===t&&(t=!1),this.foundation.close(t)},Object.defineProperty(e.prototype,"quickOpen",{set:function(t){this.foundation.setQuickOpen(t)},enumerable:!1,configurable:!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(x.FIXED):this.root.classList.remove(x.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(Y.strings.CLOSED_EVENT,{})},notifyClosing:function(){t.emit(Y.strings.CLOSING_EVENT,{})},notifyOpen:function(){return t.emit(Y.strings.OPENED_EVENT,{})},notifyOpening:function(){return t.emit(Y.strings.OPENING_EVENT,{})},isElementInContainer:function(e){return t.root.contains(e)},isRtl:function(){return"rtl"===getComputedStyle(t.root).getPropertyValue("direction")},setTransformOrigin:function(e){var n=function(t,e){if(function(t){return Boolean(t.document)&&"function"==typeof t.document.createElement}(t)&&e in Z){var n=t.document.createElement("div"),i=Z[e],o=i.standard,r=i.prefixed;return o in n.style?o:r}return e}(window,"transform")+"-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()},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){var n=t.root;n.style.left="left"in e?e.left+"px":"",n.style.right="right"in e?e.right+"px":"",n.style.top="top"in e?e.top+"px":"",n.style.bottom="bottom"in e?e.bottom+"px":""},setMaxHeight:function(e){t.root.style.maxHeight=e}};return new Y(e)},e}(f),et={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},nt={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list,.mdc-deprecated-list",SELECTED_EVENT:"MDCMenu:selected",SKIP_RESTORE_FOCUS:"data-menu-item-skip-restore-focus"},it={FOCUS_ROOT_INDEX:-1};!function(t){t[t.NONE=0]="NONE",t[t.LIST_ROOT=1]="LIST_ROOT",t[t.FIRST_ITEM=2]="FIRST_ITEM",t[t.LAST_ITEM=3]="LAST_ITEM"}(J||(J={}));var ot=function(t){function e(n){var i=t.call(this,c(c({},e.defaultAdapter),n))||this;return i.closeAnimationEndTimerId=0,i.defaultFocusState=J.LIST_ROOT,i.selectedIndex=-1,i}return u(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return et},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return nt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return it},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},getAttributeFromElementAtIndex:function(){return null},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return-1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return-1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){this.closeAnimationEndTimerId&&clearTimeout(this.closeAnimationEndTimerId),this.adapter.closeSurface()},e.prototype.handleKeydown=function(t){var e=t.key,n=t.keyCode;("Tab"===e||9===n)&&this.adapter.closeSurface(!0)},e.prototype.handleItemAction=function(t){var e=this,n=this.adapter.getElementIndex(t);if(!(n<0)){this.adapter.notifySelected({index:n});var i="true"===this.adapter.getAttributeFromElementAtIndex(n,nt.SKIP_RESTORE_FOCUS);this.adapter.closeSurface(i),this.closeAnimationEndTimerId=setTimeout((function(){var n=e.adapter.getElementIndex(t);n>=0&&e.adapter.isSelectableItemAtIndex(n)&&e.setSelectedIndex(n)}),Y.numbers.TRANSITION_CLOSE_DURATION)}},e.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState){case J.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case J.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case J.NONE:break;default:this.adapter.focusListRoot()}},e.prototype.setDefaultFocusState=function(t){this.defaultFocusState=t},e.prototype.getSelectedIndex=function(){return this.selectedIndex},e.prototype.setSelectedIndex=function(t){if(this.validatedIndex(t),!this.adapter.isSelectableItemAtIndex(t))throw new Error("MDCMenuFoundation: No selection group at specified index.");var e=this.adapter.getSelectedSiblingOfItemAtIndex(t);e>=0&&(this.adapter.removeAttributeFromElementAtIndex(e,nt.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(e,et.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(t,et.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(t,nt.ARIA_CHECKED_ATTR,"true"),this.selectedIndex=t},e.prototype.setEnabled=function(t,e){this.validatedIndex(t),e?(this.adapter.removeClassFromElementAtIndex(t,D.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(t,nt.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(t,D.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(t,nt.ARIA_DISABLED_ATTR,"true"))},e.prototype.validatedIndex=function(t){var e=this.adapter.getMenuItemCount();if(!(t>=0&&t<e))throw new Error("MDCMenuFoundation: No list item at specified index.")},e}(p),rt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t,e){void 0===t&&(t=function(t){return new tt(t)}),void 0===e&&(e=function(t){return new Q(t)}),this.menuSurfaceFactory=t,this.listFactory=e},e.prototype.initialSyncWithDOM=function(){var t=this;this.menuSurface=this.menuSurfaceFactory(this.root);var e=this.root.querySelector(nt.LIST_SELECTOR);e?(this.list=this.listFactory(e),this.list.wrapFocus=!0):this.list=null,this.handleKeydown=function(e){t.foundation.handleKeydown(e)},this.handleItemAction=function(e){t.foundation.handleItemAction(t.items[e.detail.index])},this.handleMenuSurfaceOpened=function(){t.foundation.handleMenuSurfaceOpened()},this.menuSurface.listen(Y.strings.OPENED_EVENT,this.handleMenuSurfaceOpened),this.listen("keydown",this.handleKeydown),this.listen($.strings.ACTION_EVENT,this.handleItemAction)},e.prototype.destroy=function(){this.list&&this.list.destroy(),this.menuSurface.destroy(),this.menuSurface.unlisten(Y.strings.OPENED_EVENT,this.handleMenuSurfaceOpened),this.unlisten("keydown",this.handleKeydown),this.unlisten($.strings.ACTION_EVENT,this.handleItemAction),t.prototype.destroy.call(this)},Object.defineProperty(e.prototype,"open",{get:function(){return this.menuSurface.isOpen()},set:function(t){t?this.menuSurface.open():this.menuSurface.close()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wrapFocus",{get:function(){return!!this.list&&this.list.wrapFocus},set:function(t){this.list&&(this.list.wrapFocus=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasTypeahead",{set:function(t){this.list&&(this.list.hasTypeahead=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"typeaheadInProgress",{get:function(){return!!this.list&&this.list.typeaheadInProgress},enumerable:!1,configurable:!0}),e.prototype.typeaheadMatchItem=function(t,e){return this.list?this.list.typeaheadMatchItem(t,e):-1},e.prototype.layout=function(){this.list&&this.list.layout()},Object.defineProperty(e.prototype,"items",{get:function(){return this.list?this.list.listElements:[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"singleSelection",{set:function(t){this.list&&(this.list.singleSelection=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectedIndex",{get:function(){return this.list?this.list.selectedIndex:P.UNSET_INDEX},set:function(t){this.list&&(this.list.selectedIndex=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quickOpen",{set:function(t){this.menuSurface.quickOpen=t},enumerable:!1,configurable:!0}),e.prototype.setDefaultFocusState=function(t){this.foundation.setDefaultFocusState(t)},e.prototype.setAnchorCorner=function(t){this.menuSurface.setAnchorCorner(t)},e.prototype.setAnchorMargin=function(t){this.menuSurface.setAnchorMargin(t)},e.prototype.setSelectedIndex=function(t){this.foundation.setSelectedIndex(t)},e.prototype.setEnabled=function(t,e){this.foundation.setEnabled(t,e)},e.prototype.getOptionByIndex=function(t){return t<this.items.length?this.items[t]:null},e.prototype.getPrimaryTextAtIndex=function(t){var e=this.getOptionByIndex(t);return e&&this.list&&this.list.getPrimaryText(e)||""},e.prototype.setFixedPosition=function(t){this.menuSurface.setFixedPosition(t)},e.prototype.setIsHoisted=function(t){this.menuSurface.setIsHoisted(t)},e.prototype.setAbsolutePosition=function(t,e){this.menuSurface.setAbsolutePosition(t,e)},e.prototype.setAnchorElement=function(t){this.menuSurface.anchorElement=t},e.prototype.getDefaultFoundation=function(){var t=this;return new ot({addClassToElementAtIndex:function(e,n){t.items[e].classList.add(n)},removeClassFromElementAtIndex:function(e,n){t.items[e].classList.remove(n)},addAttributeToElementAtIndex:function(e,n,i){t.items[e].setAttribute(n,i)},removeAttributeFromElementAtIndex:function(e,n){t.items[e].removeAttribute(n)},getAttributeFromElementAtIndex:function(e,n){return t.items[e].getAttribute(n)},elementContainsClass:function(t,e){return t.classList.contains(e)},closeSurface:function(e){t.menuSurface.close(e)},getElementIndex:function(e){return t.items.indexOf(e)},notifySelected:function(e){t.emit(nt.SELECTED_EVENT,{index:e.index,item:t.items[e.index]})},getMenuItemCount:function(){return t.items.length},focusItemAtIndex:function(e){t.items[e].focus()},focusListRoot:function(){t.root.querySelector(nt.LIST_SELECTOR).focus()},isSelectableItemAtIndex:function(e){return!!m(t.items[e],"."+et.MENU_SELECTION_GROUP)},getSelectedSiblingOfItemAtIndex:function(e){var n=m(t.items[e],"."+et.MENU_SELECTION_GROUP).querySelector("."+et.MENU_SELECTED_LIST_ITEM);return n?t.items.indexOf(n):-1}})},e}(f),st={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},at={NOTCH_ELEMENT_PADDING:8},ut={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},ct=function(t){function e(n){return t.call(this,c(c({},e.defaultAdapter),n))||this}return u(e,t),Object.defineProperty(e,"strings",{get:function(){return st},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return ut},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return at},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!1,configurable:!0}),e.prototype.notch=function(t){var n=e.cssClasses.OUTLINE_NOTCHED;t>0&&(t+=at.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(t),this.adapter.addClass(n)},e.prototype.closeNotch=function(){var t=e.cssClasses.OUTLINE_NOTCHED;this.adapter.removeClass(t),this.adapter.removeNotchWidthProperty()},e}(p),dt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialSyncWithDOM=function(){this.notchElement=this.root.querySelector(st.NOTCH_ELEMENT_SELECTOR);var t=this.root.querySelector("."+A.cssClasses.ROOT);t?(t.style.transitionDuration="0s",this.root.classList.add(ut.OUTLINE_UPGRADED),requestAnimationFrame((function(){t.style.transitionDuration=""}))):this.root.classList.add(ut.NO_LABEL)},e.prototype.notch=function(t){this.foundation.notch(t)},e.prototype.closeNotch=function(){this.foundation.closeNotch()},e.prototype.getDefaultFoundation=function(){var t=this;return new ct({addClass:function(e){return t.root.classList.add(e)},removeClass:function(e){return t.root.classList.remove(e)},setNotchWidthProperty:function(e){t.notchElement.style.setProperty("width",e+"px")},removeNotchWidthProperty:function(){t.notchElement.style.removeProperty("width")}})},e}(f);function lt(t){return void 0===t&&(t=window),!!function(t){void 0===t&&(t=window);var e=!1;try{var n={get passive(){return e=!0,!1}},i=function(){};t.document.addEventListener("test",i,n),t.document.removeEventListener("test",i,n)}catch(t){e=!1}return e}(t)&&{passive:!0}}var ht,pt={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},ft={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},mt={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300},Et=["touchstart","pointerdown","mousedown","keydown"],It=["touchend","pointerup","mouseup","contextmenu"],yt=[],gt=function(t){function e(n){var i=t.call(this,c(c({},e.defaultAdapter),n))||this;return i.activationAnimationHasEnded=!1,i.activationTimer=0,i.fgDeactivationRemovalTimer=0,i.fgScale="0",i.frame={width:0,height:0},i.initialSize=0,i.layoutFrame=0,i.maxRadius=0,i.unboundedCoords={left:0,top:0},i.activationState=i.defaultActivationState(),i.activationTimerCallback=function(){i.activationAnimationHasEnded=!0,i.runDeactivationUXLogicIfReady()},i.activateHandler=function(t){i.activateImpl(t)},i.deactivateHandler=function(){i.deactivateImpl()},i.focusHandler=function(){i.handleFocus()},i.blurHandler=function(){i.handleBlur()},i.resizeHandler=function(){i.layout()},i}return u(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return pt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return ft},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return mt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=this,n=this.supportsPressRipple();if(this.registerRootHandlers(n),n){var i=e.cssClasses,o=i.ROOT,r=i.UNBOUNDED;requestAnimationFrame((function(){t.adapter.addClass(o),t.adapter.isUnbounded()&&(t.adapter.addClass(r),t.layoutInternal())}))}},e.prototype.destroy=function(){var t=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(e.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(e.cssClasses.FG_DEACTIVATION));var n=e.cssClasses,i=n.ROOT,o=n.UNBOUNDED;requestAnimationFrame((function(){t.adapter.removeClass(i),t.adapter.removeClass(o),t.removeCssVars()}))}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},e.prototype.activate=function(t){this.activateImpl(t)},e.prototype.deactivate=function(){this.deactivateImpl()},e.prototype.layout=function(){var t=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame((function(){t.layoutInternal(),t.layoutFrame=0}))},e.prototype.setUnbounded=function(t){var n=e.cssClasses.UNBOUNDED;t?this.adapter.addClass(n):this.adapter.removeClass(n)},e.prototype.handleFocus=function(){var t=this;requestAnimationFrame((function(){return t.adapter.addClass(e.cssClasses.BG_FOCUSED)}))},e.prototype.handleBlur=function(){var t=this;requestAnimationFrame((function(){return t.adapter.removeClass(e.cssClasses.BG_FOCUSED)}))},e.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},e.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers=function(t){var e,n;if(t){try{for(var i=d(Et),o=i.next();!o.done;o=i.next()){var r=o.value;this.adapter.registerInteractionHandler(r,this.activateHandler)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},e.prototype.registerDeactivationHandlers=function(t){var e,n;if("keydown"===t.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var i=d(It),o=i.next();!o.done;o=i.next()){var r=o.value;this.adapter.registerDocumentInteractionHandler(r,this.deactivateHandler)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}},e.prototype.deregisterRootHandlers=function(){var t,e;try{for(var n=d(Et),i=n.next();!i.done;i=n.next()){var o=i.value;this.adapter.deregisterInteractionHandler(o,this.activateHandler)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},e.prototype.deregisterDeactivationHandlers=function(){var t,e;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var n=d(It),i=n.next();!i.done;i=n.next()){var o=i.value;this.adapter.deregisterDocumentInteractionHandler(o,this.deactivateHandler)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},e.prototype.removeCssVars=function(){var t=this,n=e.strings;Object.keys(n).forEach((function(e){0===e.indexOf("VAR_")&&t.adapter.updateCssVariable(n[e],null)}))},e.prototype.activateImpl=function(t){var e=this;if(!this.adapter.isSurfaceDisabled()){var n=this.activationState;if(!n.isActivated){var i=this.previousActivationEvent;i&&void 0!==t&&i.type!==t.type||(n.isActivated=!0,n.isProgrammatic=void 0===t,n.activationEvent=t,n.wasActivatedByPointer=!n.isProgrammatic&&void 0!==t&&("mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type),void 0!==t&&yt.length>0&&yt.some((function(t){return e.adapter.containsEventTarget(t)}))?this.resetActivationState():(void 0!==t&&(yt.push(t.target),this.registerDeactivationHandlers(t)),n.wasElementMadeActive=this.checkElementMadeActive(t),n.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){yt=[],n.wasElementMadeActive||void 0===t||" "!==t.key&&32!==t.keyCode||(n.wasElementMadeActive=e.checkElementMadeActive(t),n.wasElementMadeActive&&e.animateActivation()),n.wasElementMadeActive||(e.activationState=e.defaultActivationState())}))))}}},e.prototype.checkElementMadeActive=function(t){return void 0===t||"keydown"!==t.type||this.adapter.isSurfaceActive()},e.prototype.animateActivation=function(){var t=this,n=e.strings,i=n.VAR_FG_TRANSLATE_START,o=n.VAR_FG_TRANSLATE_END,r=e.cssClasses,s=r.FG_DEACTIVATION,a=r.FG_ACTIVATION,u=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var c="",d="";if(!this.adapter.isUnbounded()){var l=this.getFgTranslationCoordinates(),h=l.startPoint,p=l.endPoint;c=h.x+"px, "+h.y+"px",d=p.x+"px, "+p.y+"px"}this.adapter.updateCssVariable(i,c),this.adapter.updateCssVariable(o,d),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(s),this.adapter.computeBoundingRect(),this.adapter.addClass(a),this.activationTimer=setTimeout((function(){t.activationTimerCallback()}),u)},e.prototype.getFgTranslationCoordinates=function(){var t,e=this.activationState,n=e.activationEvent;return{startPoint:t={x:(t=e.wasActivatedByPointer?function(t,e,n){if(!t)return{x:0,y:0};var i,o,r=e.x,s=e.y,a=r+n.left,u=s+n.top;if("touchstart"===t.type){var c=t;i=c.changedTouches[0].pageX-a,o=c.changedTouches[0].pageY-u}else{var d=t;i=d.pageX-a,o=d.pageY-u}return{x:i,y:o}}(n,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2}).x-this.initialSize/2,y:t.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},e.prototype.runDeactivationUXLogicIfReady=function(){var t=this,n=e.cssClasses.FG_DEACTIVATION,i=this.activationState,o=i.hasDeactivationUXRun,r=i.isActivated;(o||!r)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(n),this.fgDeactivationRemovalTimer=setTimeout((function(){t.adapter.removeClass(n)}),mt.FG_DEACTIVATION_MS))},e.prototype.rmBoundedActivationClasses=function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter.removeClass(t),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},e.prototype.resetActivationState=function(){var t=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout((function(){return t.previousActivationEvent=void 0}),e.numbers.TAP_DELAY_MS)},e.prototype.deactivateImpl=function(){var t=this,e=this.activationState;if(e.isActivated){var n=c({},e);e.isProgrammatic?(requestAnimationFrame((function(){t.animateDeactivation(n)})),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame((function(){t.activationState.hasDeactivationUXRun=!0,t.animateDeactivation(n),t.resetActivationState()})))}},e.prototype.animateDeactivation=function(t){var e=t.wasActivatedByPointer,n=t.wasElementMadeActive;(e||n)&&this.runDeactivationUXLogicIfReady()},e.prototype.layoutInternal=function(){this.frame=this.adapter.computeBoundingRect();var t=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?t:Math.sqrt(Math.pow(this.frame.width,2)+Math.pow(this.frame.height,2))+e.numbers.PADDING;var n=Math.floor(t*e.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&n%2!=0?this.initialSize=n-1:this.initialSize=n,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},e.prototype.updateLayoutCssVars=function(){var t=e.strings,n=t.VAR_FG_SIZE,i=t.VAR_LEFT,o=t.VAR_TOP,r=t.VAR_FG_SCALE;this.adapter.updateCssVariable(n,this.initialSize+"px"),this.adapter.updateCssVariable(r,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(i,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(o,this.unboundedCoords.top+"px"))},e}(p),vt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.disabled=!1,e}return u(e,t),e.attachTo=function(t,n){void 0===n&&(n={isUnbounded:void 0});var i=new e(t);return void 0!==n.isUnbounded&&(i.unbounded=n.isUnbounded),i},e.createAdapter=function(t){return{addClass:function(e){return t.root.classList.add(e)},browserSupportsCssVars:function(){return function(t,e){void 0===e&&(e=!1);var n,i=window.CSS;if("boolean"==typeof ht&&!e)return ht;if(!i||"function"!=typeof i.supports)return!1;var o=i.supports("--css-vars","yes"),r=i.supports("(--css-vars: yes)")&&i.supports("color","#00000000");return n=o||r,e||(ht=n),n}()},computeBoundingRect:function(){return t.root.getBoundingClientRect()},containsEventTarget:function(e){return t.root.contains(e)},deregisterDocumentInteractionHandler:function(t,e){return document.documentElement.removeEventListener(t,e,lt())},deregisterInteractionHandler:function(e,n){return t.root.removeEventListener(e,n,lt())},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return E(t.root,":active")},isSurfaceDisabled:function(){return Boolean(t.disabled)},isUnbounded:function(){return Boolean(t.unbounded)},registerDocumentInteractionHandler:function(t,e){return document.documentElement.addEventListener(t,e,lt())},registerInteractionHandler:function(e,n){return t.root.addEventListener(e,n,lt())},registerResizeHandler:function(t){return window.addEventListener("resize",t)},removeClass:function(e){return t.root.classList.remove(e)},updateCssVariable:function(e,n){return t.root.style.setProperty(e,n)}}},Object.defineProperty(e.prototype,"unbounded",{get:function(){return Boolean(this.isUnbounded)},set:function(t){this.isUnbounded=Boolean(t),this.setUnbounded()},enumerable:!1,configurable:!0}),e.prototype.activate=function(){this.foundation.activate()},e.prototype.deactivate=function(){this.foundation.deactivate()},e.prototype.layout=function(){this.foundation.layout()},e.prototype.getDefaultFoundation=function(){return new gt(e.createAdapter(this))},e.prototype.initialSyncWithDOM=function(){var t=this.root;this.isUnbounded="mdcRippleIsUnbounded"in t.dataset},e.prototype.setUnbounded=function(){this.foundation.setUnbounded(Boolean(this.isUnbounded))},e}(f),bt={ACTIVATED:"mdc-select--activated",DISABLED:"mdc-select--disabled",FOCUSED:"mdc-select--focused",INVALID:"mdc-select--invalid",MENU_INVALID:"mdc-select__menu--invalid",OUTLINED:"mdc-select--outlined",REQUIRED:"mdc-select--required",ROOT:"mdc-select",WITH_LEADING_ICON:"mdc-select--with-leading-icon"},At={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",ARIA_SELECTED_ATTR:"aria-selected",CHANGE_EVENT:"MDCSelect:change",HIDDEN_INPUT_SELECTOR:'input[type="hidden"]',LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-select__icon",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",MENU_SELECTOR:".mdc-select__menu",OUTLINE_SELECTOR:".mdc-notched-outline",SELECTED_TEXT_SELECTOR:".mdc-select__selected-text",SELECT_ANCHOR_SELECTOR:".mdc-select__anchor",VALUE_ATTR:"data-value"},Tt={LABEL_SCALE:.75,UNSET_INDEX:-1,CLICK_DEBOUNCE_TIMEOUT_MS:330},St=function(t){function e(n,i){void 0===i&&(i={});var o=t.call(this,c(c({},e.defaultAdapter),n))||this;return o.disabled=!1,o.isMenuOpen=!1,o.useDefaultValidation=!0,o.customValidity=!0,o.lastSelectedIndex=Tt.UNSET_INDEX,o.clickDebounceTimeout=0,o.recentlyClicked=!1,o.leadingIcon=i.leadingIcon,o.helperText=i.helperText,o}return u(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return bt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Tt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return At},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},activateBottomLine:function(){},deactivateBottomLine:function(){},getSelectedIndex:function(){return-1},setSelectedIndex:function(){},hasLabel:function(){return!1},floatLabel:function(){},getLabelWidth:function(){return 0},setLabelRequired:function(){},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){},setRippleCenter:function(){},notifyChange:function(){},setSelectedText:function(){},isSelectAnchorFocused:function(){return!1},getSelectAnchorAttr:function(){return""},setSelectAnchorAttr:function(){},removeSelectAnchorAttr:function(){},addMenuClass:function(){},removeMenuClass:function(){},openMenu:function(){},closeMenu:function(){},getAnchorElement:function(){return null},setMenuAnchorElement:function(){},setMenuAnchorCorner:function(){},setMenuWrapFocus:function(){},focusMenuItemAtIndex:function(){},getMenuItemCount:function(){return 0},getMenuItemValues:function(){return[]},getMenuItemTextAtIndex:function(){return""},isTypeaheadInProgress:function(){return!1},typeaheadMatchItem:function(){return-1}}},enumerable:!1,configurable:!0}),e.prototype.getSelectedIndex=function(){return this.adapter.getSelectedIndex()},e.prototype.setSelectedIndex=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1),t>=this.adapter.getMenuItemCount()||(t===Tt.UNSET_INDEX?this.adapter.setSelectedText(""):this.adapter.setSelectedText(this.adapter.getMenuItemTextAtIndex(t).trim()),this.adapter.setSelectedIndex(t),e&&this.adapter.closeMenu(),n||this.lastSelectedIndex===t||this.handleChange(),this.lastSelectedIndex=t)},e.prototype.setValue=function(t,e){void 0===e&&(e=!1);var n=this.adapter.getMenuItemValues().indexOf(t);this.setSelectedIndex(n,!1,e)},e.prototype.getValue=function(){var t=this.adapter.getSelectedIndex(),e=this.adapter.getMenuItemValues();return t!==Tt.UNSET_INDEX?e[t]:""},e.prototype.getDisabled=function(){return this.disabled},e.prototype.setDisabled=function(t){this.disabled=t,this.disabled?(this.adapter.addClass(bt.DISABLED),this.adapter.closeMenu()):this.adapter.removeClass(bt.DISABLED),this.leadingIcon&&this.leadingIcon.setDisabled(this.disabled),this.disabled?this.adapter.removeSelectAnchorAttr("tabindex"):this.adapter.setSelectAnchorAttr("tabindex","0"),this.adapter.setSelectAnchorAttr("aria-disabled",this.disabled.toString())},e.prototype.openMenu=function(){this.adapter.addClass(bt.ACTIVATED),this.adapter.openMenu(),this.isMenuOpen=!0,this.adapter.setSelectAnchorAttr("aria-expanded","true")},e.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},e.prototype.layout=function(){if(this.adapter.hasLabel()){var t=this.getValue().length>0,e=this.adapter.hasClass(bt.FOCUSED),n=t||e,i=this.adapter.hasClass(bt.REQUIRED);this.notchOutline(n),this.adapter.floatLabel(n),this.adapter.setLabelRequired(i)}},e.prototype.layoutOptions=function(){var t=this.adapter.getMenuItemValues().indexOf(this.getValue());this.setSelectedIndex(t,!1,!0)},e.prototype.handleMenuOpened=function(){if(0!==this.adapter.getMenuItemValues().length){var t=this.getSelectedIndex(),e=t>=0?t:0;this.adapter.focusMenuItemAtIndex(e)}},e.prototype.handleMenuClosing=function(){this.adapter.setSelectAnchorAttr("aria-expanded","false")},e.prototype.handleMenuClosed=function(){this.adapter.removeClass(bt.ACTIVATED),this.isMenuOpen=!1,this.adapter.isSelectAnchorFocused()||this.blur()},e.prototype.handleChange=function(){this.layout(),this.adapter.notifyChange(this.getValue()),this.adapter.hasClass(bt.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},e.prototype.handleMenuItemAction=function(t){this.setSelectedIndex(t,!0)},e.prototype.handleFocus=function(){this.adapter.addClass(bt.FOCUSED),this.layout(),this.adapter.activateBottomLine()},e.prototype.handleBlur=function(){this.isMenuOpen||this.blur()},e.prototype.handleClick=function(t){this.disabled||this.recentlyClicked||(this.setClickDebounceTimeout(),this.isMenuOpen?this.adapter.closeMenu():(this.adapter.setRippleCenter(t),this.openMenu()))},e.prototype.handleKeydown=function(t){if(!this.isMenuOpen&&this.adapter.hasClass(bt.FOCUSED)){var e=V(t)===F.ENTER,n=V(t)===F.SPACEBAR,i=V(t)===F.ARROW_UP,o=V(t)===F.ARROW_DOWN;if(!t.ctrlKey&&!t.metaKey&&(!n&&t.key&&1===t.key.length||n&&this.adapter.isTypeaheadInProgress())){var r=n?" ":t.key,s=this.adapter.typeaheadMatchItem(r,this.getSelectedIndex());return s>=0&&this.setSelectedIndex(s),void t.preventDefault()}(e||n||i||o)&&(this.openMenu(),t.preventDefault())}},e.prototype.notchOutline=function(t){if(this.adapter.hasOutline()){var e=this.adapter.hasClass(bt.FOCUSED);if(t){var n=Tt.LABEL_SCALE,i=this.adapter.getLabelWidth()*n;this.adapter.notchOutline(i)}else e||this.adapter.closeOutline()}},e.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon&&this.leadingIcon.setAriaLabel(t)},e.prototype.setLeadingIconContent=function(t){this.leadingIcon&&this.leadingIcon.setContent(t)},e.prototype.getUseDefaultValidation=function(){return this.useDefaultValidation},e.prototype.setUseDefaultValidation=function(t){this.useDefaultValidation=t},e.prototype.setValid=function(t){this.useDefaultValidation||(this.customValidity=t),this.adapter.setSelectAnchorAttr("aria-invalid",(!t).toString()),t?(this.adapter.removeClass(bt.INVALID),this.adapter.removeMenuClass(bt.MENU_INVALID)):(this.adapter.addClass(bt.INVALID),this.adapter.addMenuClass(bt.MENU_INVALID)),this.syncHelperTextValidity(t)},e.prototype.isValid=function(){return this.useDefaultValidation&&this.adapter.hasClass(bt.REQUIRED)&&!this.adapter.hasClass(bt.DISABLED)?this.getSelectedIndex()!==Tt.UNSET_INDEX&&(0!==this.getSelectedIndex()||Boolean(this.getValue())):this.customValidity},e.prototype.setRequired=function(t){t?this.adapter.addClass(bt.REQUIRED):this.adapter.removeClass(bt.REQUIRED),this.adapter.setSelectAnchorAttr("aria-required",t.toString()),this.adapter.setLabelRequired(t)},e.prototype.getRequired=function(){return"true"===this.adapter.getSelectAnchorAttr("aria-required")},e.prototype.init=function(){var t=this.adapter.getAnchorElement();t&&(this.adapter.setMenuAnchorElement(t),this.adapter.setMenuAnchorCorner(y.BOTTOM_START)),this.adapter.setMenuWrapFocus(!1),this.setDisabled(this.adapter.hasClass(bt.DISABLED)),this.syncHelperTextValidity(!this.adapter.hasClass(bt.INVALID)),this.layout(),this.layoutOptions()},e.prototype.blur=function(){this.adapter.removeClass(bt.FOCUSED),this.layout(),this.adapter.deactivateBottomLine(),this.adapter.hasClass(bt.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},e.prototype.syncHelperTextValidity=function(t){if(this.helperText){this.helperText.setValidity(t);var e=this.helperText.isVisible(),n=this.helperText.getId();e&&n?this.adapter.setSelectAnchorAttr(At.ARIA_DESCRIBEDBY,n):this.adapter.removeSelectAnchorAttr(At.ARIA_DESCRIBEDBY)}},e.prototype.setClickDebounceTimeout=function(){var t=this;clearTimeout(this.clickDebounceTimeout),this.clickDebounceTimeout=setTimeout((function(){t.recentlyClicked=!1}),Tt.CLICK_DEBOUNCE_TIMEOUT_MS),this.recentlyClicked=!0},e}(p),Ct={ARIA_HIDDEN:"aria-hidden",ROLE:"role"},_t={HELPER_TEXT_VALIDATION_MSG:"mdc-select-helper-text--validation-msg",HELPER_TEXT_VALIDATION_MSG_PERSISTENT:"mdc-select-helper-text--validation-msg-persistent"},Ot=function(t){function e(n){return t.call(this,c(c({},e.defaultAdapter),n))||this}return u(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return _t},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return Ct},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setAttr:function(){},getAttr:function(){return null},removeAttr:function(){},setContent:function(){}}},enumerable:!1,configurable:!0}),e.prototype.getId=function(){return this.adapter.getAttr("id")},e.prototype.isVisible=function(){return"true"!==this.adapter.getAttr(Ct.ARIA_HIDDEN)},e.prototype.setContent=function(t){this.adapter.setContent(t)},e.prototype.setValidation=function(t){t?this.adapter.addClass(_t.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(_t.HELPER_TEXT_VALIDATION_MSG)},e.prototype.setValidationMsgPersistent=function(t){t?this.adapter.addClass(_t.HELPER_TEXT_VALIDATION_MSG_PERSISTENT):this.adapter.removeClass(_t.HELPER_TEXT_VALIDATION_MSG_PERSISTENT)},e.prototype.getIsValidation=function(){return this.adapter.hasClass(_t.HELPER_TEXT_VALIDATION_MSG)},e.prototype.getIsValidationMsgPersistent=function(){return this.adapter.hasClass(_t.HELPER_TEXT_VALIDATION_MSG_PERSISTENT)},e.prototype.setValidity=function(t){if(this.adapter.hasClass(_t.HELPER_TEXT_VALIDATION_MSG)){var e=this.adapter.hasClass(_t.HELPER_TEXT_VALIDATION_MSG_PERSISTENT);if(!t||e)return this.showToScreenReader(),void(t?this.adapter.removeAttr(Ct.ROLE):this.adapter.setAttr(Ct.ROLE,"alert"));this.adapter.removeAttr(Ct.ROLE),this.hide()}},e.prototype.showToScreenReader=function(){this.adapter.removeAttr(Ct.ARIA_HIDDEN)},e.prototype.hide=function(){this.adapter.setAttr(Ct.ARIA_HIDDEN,"true")},e}(p),xt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"foundationForSelect",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),e.prototype.getDefaultFoundation=function(){var t=this;return new Ot({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)},getAttr:function(e){return t.root.getAttribute(e)},setAttr:function(e,n){return t.root.setAttribute(e,n)},removeAttr:function(e){return t.root.removeAttribute(e)},setContent:function(e){t.root.textContent=e}})},e}(f),Lt={ICON_EVENT:"MDCSelect:icon",ICON_ROLE:"button"},Rt=["click","keydown"],Dt=function(t){function e(n){var i=t.call(this,c(c({},e.defaultAdapter),n))||this;return i.savedTabIndex=null,i.interactionHandler=function(t){i.handleInteraction(t)},i}return u(e,t),Object.defineProperty(e,"strings",{get:function(){return Lt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t,e;this.savedTabIndex=this.adapter.getAttr("tabindex");try{for(var n=d(Rt),i=n.next();!i.done;i=n.next()){var o=i.value;this.adapter.registerInteractionHandler(o,this.interactionHandler)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},e.prototype.destroy=function(){var t,e;try{for(var n=d(Rt),i=n.next();!i.done;i=n.next()){var o=i.value;this.adapter.deregisterInteractionHandler(o,this.interactionHandler)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},e.prototype.setDisabled=function(t){this.savedTabIndex&&(t?(this.adapter.setAttr("tabindex","-1"),this.adapter.removeAttr("role")):(this.adapter.setAttr("tabindex",this.savedTabIndex),this.adapter.setAttr("role",Lt.ICON_ROLE)))},e.prototype.setAriaLabel=function(t){this.adapter.setAttr("aria-label",t)},e.prototype.setContent=function(t){this.adapter.setContent(t)},e.prototype.handleInteraction=function(t){var e="Enter"===t.key||13===t.keyCode;("click"===t.type||e)&&this.adapter.notifyIconAction()},e}(p),Nt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"foundationForSelect",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),e.prototype.getDefaultFoundation=function(){var t=this;return new Dt({getAttr:function(e){return t.root.getAttribute(e)},setAttr:function(e,n){return t.root.setAttribute(e,n)},removeAttr:function(e){return t.root.removeAttribute(e)},setContent:function(e){t.root.textContent=e},registerInteractionHandler:function(e,n){return t.listen(e,n)},deregisterInteractionHandler:function(e,n){return t.unlisten(e,n)},notifyIconAction:function(){return t.emit(Dt.strings.ICON_EVENT,{},!0)}})},e}(f),Mt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t,e,n,i,o,r){if(void 0===t&&(t=function(t){return new T(t)}),void 0===e&&(e=function(t){return new O(t)}),void 0===n&&(n=function(t){return new dt(t)}),void 0===i&&(i=function(t){return new rt(t)}),void 0===o&&(o=function(t){return new Nt(t)}),void 0===r&&(r=function(t){return new xt(t)}),this.selectAnchor=this.root.querySelector(At.SELECT_ANCHOR_SELECTOR),this.selectedText=this.root.querySelector(At.SELECTED_TEXT_SELECTOR),this.hiddenInput=this.root.querySelector(At.HIDDEN_INPUT_SELECTOR),!this.selectedText)throw new Error("MDCSelect: Missing required element: The following selector must be present: '"+At.SELECTED_TEXT_SELECTOR+"'");if(this.selectAnchor.hasAttribute(At.ARIA_CONTROLS)){var s=document.getElementById(this.selectAnchor.getAttribute(At.ARIA_CONTROLS));s&&(this.helperText=r(s))}this.menuSetup(i);var a=this.root.querySelector(At.LABEL_SELECTOR);this.label=a?t(a):null;var u=this.root.querySelector(At.LINE_RIPPLE_SELECTOR);this.lineRipple=u?e(u):null;var c=this.root.querySelector(At.OUTLINE_SELECTOR);this.outline=c?n(c):null;var d=this.root.querySelector(At.LEADING_ICON_SELECTOR);d&&(this.leadingIcon=o(d)),this.root.classList.contains(bt.OUTLINED)||(this.ripple=this.createRipple())},e.prototype.initialSyncWithDOM=function(){var t=this;if(this.handleFocus=function(){t.foundation.handleFocus()},this.handleBlur=function(){t.foundation.handleBlur()},this.handleClick=function(e){t.selectAnchor.focus(),t.foundation.handleClick(t.getNormalizedXCoordinate(e))},this.handleKeydown=function(e){t.foundation.handleKeydown(e)},this.handleMenuItemAction=function(e){t.foundation.handleMenuItemAction(e.detail.index)},this.handleMenuOpened=function(){t.foundation.handleMenuOpened()},this.handleMenuClosed=function(){t.foundation.handleMenuClosed()},this.handleMenuClosing=function(){t.foundation.handleMenuClosing()},this.selectAnchor.addEventListener("focus",this.handleFocus),this.selectAnchor.addEventListener("blur",this.handleBlur),this.selectAnchor.addEventListener("click",this.handleClick),this.selectAnchor.addEventListener("keydown",this.handleKeydown),this.menu.listen(L.CLOSED_EVENT,this.handleMenuClosed),this.menu.listen(L.CLOSING_EVENT,this.handleMenuClosing),this.menu.listen(L.OPENED_EVENT,this.handleMenuOpened),this.menu.listen(nt.SELECTED_EVENT,this.handleMenuItemAction),this.hiddenInput){if(this.hiddenInput.value)return this.foundation.setValue(this.hiddenInput.value,!0),void this.foundation.layout();this.hiddenInput.value=this.value}},e.prototype.destroy=function(){this.selectAnchor.removeEventListener("focus",this.handleFocus),this.selectAnchor.removeEventListener("blur",this.handleBlur),this.selectAnchor.removeEventListener("keydown",this.handleKeydown),this.selectAnchor.removeEventListener("click",this.handleClick),this.menu.unlisten(L.CLOSED_EVENT,this.handleMenuClosed),this.menu.unlisten(L.OPENED_EVENT,this.handleMenuOpened),this.menu.unlisten(nt.SELECTED_EVENT,this.handleMenuItemAction),this.menu.destroy(),this.ripple&&this.ripple.destroy(),this.outline&&this.outline.destroy(),this.leadingIcon&&this.leadingIcon.destroy(),this.helperText&&this.helperText.destroy(),t.prototype.destroy.call(this)},Object.defineProperty(e.prototype,"value",{get:function(){return this.foundation.getValue()},set:function(t){this.foundation.setValue(t)},enumerable:!1,configurable:!0}),e.prototype.setValue=function(t,e){void 0===e&&(e=!1),this.foundation.setValue(t,e)},Object.defineProperty(e.prototype,"selectedIndex",{get:function(){return this.foundation.getSelectedIndex()},set:function(t){this.foundation.setSelectedIndex(t,!0)},enumerable:!1,configurable:!0}),e.prototype.setSelectedIndex=function(t,e){void 0===e&&(e=!1),this.foundation.setSelectedIndex(t,!0,e)},Object.defineProperty(e.prototype,"disabled",{get:function(){return this.foundation.getDisabled()},set:function(t){this.foundation.setDisabled(t),this.hiddenInput&&(this.hiddenInput.disabled=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leadingIconAriaLabel",{set:function(t){this.foundation.setLeadingIconAriaLabel(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leadingIconContent",{set:function(t){this.foundation.setLeadingIconContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"helperTextContent",{set:function(t){this.foundation.setHelperTextContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useDefaultValidation",{set:function(t){this.foundation.setUseDefaultValidation(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return this.foundation.isValid()},set:function(t){this.foundation.setValid(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.foundation.getRequired()},set:function(t){this.foundation.setRequired(t)},enumerable:!1,configurable:!0}),e.prototype.layout=function(){this.foundation.layout()},e.prototype.layoutOptions=function(){this.foundation.layoutOptions(),this.menu.layout(),this.menuItemValues=this.menu.items.map((function(t){return t.getAttribute(At.VALUE_ATTR)||""})),this.hiddenInput&&(this.hiddenInput.value=this.value)},e.prototype.getDefaultFoundation=function(){var t=c(c(c(c({},this.getSelectAdapterMethods()),this.getCommonAdapterMethods()),this.getOutlineAdapterMethods()),this.getLabelAdapterMethods());return new St(t,this.getFoundationMap())},e.prototype.menuSetup=function(t){this.menuElement=this.root.querySelector(At.MENU_SELECTOR),this.menu=t(this.menuElement),this.menu.hasTypeahead=!0,this.menu.singleSelection=!0,this.menuItemValues=this.menu.items.map((function(t){return t.getAttribute(At.VALUE_ATTR)||""}))},e.prototype.createRipple=function(){var t=this,e=c(c({},vt.createAdapter({root:this.selectAnchor})),{registerInteractionHandler:function(e,n){t.selectAnchor.addEventListener(e,n)},deregisterInteractionHandler:function(e,n){t.selectAnchor.removeEventListener(e,n)}});return new vt(this.selectAnchor,new gt(e))},e.prototype.getSelectAdapterMethods=function(){var t=this;return{getMenuItemAttr:function(t,e){return t.getAttribute(e)},setSelectedText:function(e){t.selectedText.textContent=e},isSelectAnchorFocused:function(){return document.activeElement===t.selectAnchor},getSelectAnchorAttr:function(e){return t.selectAnchor.getAttribute(e)},setSelectAnchorAttr:function(e,n){t.selectAnchor.setAttribute(e,n)},removeSelectAnchorAttr:function(e){t.selectAnchor.removeAttribute(e)},addMenuClass:function(e){t.menuElement.classList.add(e)},removeMenuClass:function(e){t.menuElement.classList.remove(e)},openMenu:function(){t.menu.open=!0},closeMenu:function(){t.menu.open=!1},getAnchorElement:function(){return t.root.querySelector(At.SELECT_ANCHOR_SELECTOR)},setMenuAnchorElement:function(e){t.menu.setAnchorElement(e)},setMenuAnchorCorner:function(e){t.menu.setAnchorCorner(e)},setMenuWrapFocus:function(e){t.menu.wrapFocus=e},getSelectedIndex:function(){var e=t.menu.selectedIndex;return e instanceof Array?e[0]:e},setSelectedIndex:function(e){t.menu.selectedIndex=e},focusMenuItemAtIndex:function(e){t.menu.items[e].focus()},getMenuItemCount:function(){return t.menu.items.length},getMenuItemValues:function(){return t.menuItemValues},getMenuItemTextAtIndex:function(e){return t.menu.getPrimaryTextAtIndex(e)},isTypeaheadInProgress:function(){return t.menu.typeaheadInProgress},typeaheadMatchItem:function(e,n){return t.menu.typeaheadMatchItem(e,n)}}},e.prototype.getCommonAdapterMethods=function(){var t=this;return{addClass:function(e){t.root.classList.add(e)},removeClass:function(e){t.root.classList.remove(e)},hasClass:function(e){return t.root.classList.contains(e)},setRippleCenter:function(e){t.lineRipple&&t.lineRipple.setRippleCenter(e)},activateBottomLine:function(){t.lineRipple&&t.lineRipple.activate()},deactivateBottomLine:function(){t.lineRipple&&t.lineRipple.deactivate()},notifyChange:function(e){t.hiddenInput&&(t.hiddenInput.value=e);var n=t.selectedIndex;t.emit(At.CHANGE_EVENT,{value:e,index:n},!0)}}},e.prototype.getOutlineAdapterMethods=function(){var t=this;return{hasOutline:function(){return Boolean(t.outline)},notchOutline:function(e){t.outline&&t.outline.notch(e)},closeOutline:function(){t.outline&&t.outline.closeNotch()}}},e.prototype.getLabelAdapterMethods=function(){var t=this;return{hasLabel:function(){return!!t.label},floatLabel:function(e){t.label&&t.label.float(e)},getLabelWidth:function(){return t.label?t.label.getWidth():0},setLabelRequired:function(e){t.label&&t.label.setRequired(e)}}},e.prototype.getNormalizedXCoordinate=function(t){var e=t.target.getBoundingClientRect();return(this.isTouchEvent(t)?t.touches[0].clientX:t.clientX)-e.left},e.prototype.isTouchEvent=function(t){return Boolean(t.touches)},e.prototype.getFoundationMap=function(){return{helperText:this.helperText?this.helperText.foundationForSelect:void 0,leadingIcon:this.leadingIcon?this.leadingIcon.foundationForSelect:void 0}},e}(f);function wt(t){return wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wt(t)}function Pt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==wt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==wt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===wt(o)?o:String(o)),i)}var o}var Ft=window.jQuery,Bt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=_.defaults(e||{},{name:_.random(0,1e4),label:"My Select",icon:"",selected:null,iconOption:null}),this.template=_.template(s())}var e,n;return e=t,(n=[{key:"render",value:function(){return this.$element=Ft(this.template(this.options)),this.$input=this.$element.find("select, input"),this.$icon=this.$element.find(".mdc-select__icon"),this.select=new Mt(this.$element.find(".mdc-select")[0]),this.icon=this.options.icon?new Nt(this.$icon[0]):null,this.options.iconOption&&this.setupIconToggle(),this.$element}},{key:"setupIconToggle",value:function(){var t=this;this.toggleIcons(),this.select.listen("MDCSelect:change",(function(){return t.toggleIcons()}))}},{key:"toggleIcons",value:function(){var t=this.getValue();this.options.iconOption[t]?this.$icon.attr("src",this.options.iconOption[t]).show():this.$icon.hide()}},{key:"getValue",value:function(){return this.$input.val()}},{key:"setValue",value:function(t){this.$input.val(t)}}])&&Pt(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Ht=n(5823),kt=n.n(Ht);function Vt(t){return Vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vt(t)}function Ut(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==Vt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==Vt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===Vt(o)?o:String(o)),i)}var o}var jt=window.jQuery,Gt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e||{},this.template=_.template(kt())}var e,n;return e=t,(n=[{key:"render",value:function(){return this.$menu=jt(this.template(this.options)),this.menu=new rt(this.$menu[0]),this.$menu}},{key:"show",value:function(){var t=this;this.menu.open=!0,setTimeout((function(){t.$menu.find(".mdc-menu-item--selected").focus()}),250)}},{key:"hide",value:function(){this.menu.open=!1}}])&&Ut(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Wt=n(5311),Xt=n(5311);function qt(t){return qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qt(t)}function zt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==qt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==qt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===qt(o)?o:String(o)),i)}var o}var Kt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"postForm",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Wt("<form method='POST' style='display:none;'></form>").appendTo(document.body);for(var i in e&&n.attr("target","_blank"),t)t.hasOwnProperty(i)&&Xt('<input type="hidden" />').attr({name:i,value:t[i]}).appendTo(n);n.submit(),n.remove()}}],n&&zt(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),$t=n(5148),Qt=n.n($t),Yt=n(5311);function Zt(t){return Zt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zt(t)}function Jt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==Zt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==Zt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===Zt(o)?o:String(o)),i)}var o}var te=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,(n=[{key:"show",value:function(){this._getElement().show()}},{key:"hide",value:function(){this._getElement().hide()}},{key:"_getElement",value:function(){return this.$element||(this.$element=Yt(this._getHTML()),Yt("body").append(this.$element)),this.$element}},{key:"_getHTML",value:function(){return'\n\t\t\t<div class="bgppb-page-loading">\n\t\t\t\t<span class="bgppb-page-loading__logo">'.concat(Qt(),'</span>\n\t\t\t\t<span class="bgppb-page-loading__spinner"></span>\n\t\t\t</div>\n\t\t')}}])&&Jt(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),ee=n(5311);function ne(t){return ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ne(t)}function ie(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==ne(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==ne(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===ne(o)?o:String(o)),i)}var o}var oe=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.labels=[{name:"bgppb",value:"bgppb",label:'<img src="'.concat(BoldgridEditor.plugin_url,'/assets/image/boldgrid-logo.svg"/> <span>Post and Page Builder</span>')},{name:"modern",value:"modern",label:"<span>WordPress Editor</span>"},{name:"classic",value:"classic",label:"<span>Classic Editor</span>"},{name:"default",value:"default",label:"<span>Default</span>"}],this.labels=this._filterAvailableEditors(this.labels),this.loading=new te}var e,n;return e=t,(n=[{key:"init",value:function(){this.$element=ee(this._getHtml()),this.menu=this._renderMenu(),this._setupMenu(),this._setupClick(),ee("#screen-meta-links").prepend(this.$element),this.$element.show(),this.setEditorOverrideInput(ee("form#post"))}},{key:"changeType",value:function(t){var e=this;this.loading.show(),(new Kt).postForm({bgppb_default_editor_post:t},!1),setTimeout((function(){return e.loading.hide()}),3e3)}},{key:"setEditorOverrideInput",value:function(t){var e=ee("<input/>");e.attr("type","hidden").attr("name","bgppb_default_editor_post").val(BoldgridEditor.editor_override).attr("value",BoldgridEditor.editor_override),t.append(e)}},{key:"_filterAvailableEditors",value:function(t){return t.filter((function(t){return-1!==BoldgridEditor.plugin_configs.valid_editors.indexOf(t.name)}))}},{key:"_setupMenu",value:function(){var t=this;this.$element.find("[data-action]").on("click",(function(e){var n=ee(e.currentTarget).attr("data-action");t.changeType(n)}))}},{key:"_renderMenu",value:function(){var t=new Gt({name:"bgppb-choose-editor",options:this.labels.filter((function(t){return"default"!==t.value})),selected:BoldgridEditor.globalSettings.current_editor});return this.$element.find(".menu-container").append(t.render()),t}},{key:"_setupClick",value:function(){var t=this;this.$element.find(".current-editor").on("click",(function(e){e.preventDefault(),t.menu.menu.open||t.menu.show()}))}},{key:"_getHtml",value:function(){var t=this.labels.find((function(t){return t.name===BoldgridEditor.globalSettings.current_editor}));return'\n\t\t\t<div id="bgppb-choose-editor" class="screen-meta-toggle">\n\t\t\t\t<span class="label">\n\t\t\t\t\t<span>Editor</span>\n\t\t\t\t</span>\n\t\t\t\t<span class="current-editor show-settings button">\n\t\t\t\t\t'.concat(t.label,'\n\t\t\t\t</span>\n\t\t\t\t<span class="menu-container"></span>\n\t\t\t</div>\n\t\t')}}])&&ie(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),re=n(5311);function se(t){return se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},se(t)}function ae(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==se(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==se(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===se(o)?o:String(o)),i)}var o}var ue=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,(n=[{key:"getForm",value:function(){var t=re(this._getMarkup());return t.find("mat-menu").each((function(t,e){var n=re(e),i=n.attr("name"),o=new Bt({name:"bgppb_post_type[".concat(i,"]"),label:n.attr("label"),settings:(new oe).labels,selected:BoldgridEditor.globalSettings.default_editor[i],iconOption:{bgppb:BoldgridEditor.plugin_url+"/assets/image/boldgrid-logo.svg"}});n.replaceWith(o.render()),re(o.select.menu.root).addClass("mdc-menu--supports-icon")})),this.$form=t,this.$form}},{key:"_getMarkup",value:function(){return'\n\t\t\t<form method="POST" class="bgppb-default-editor">\n\t\t\t\t<input type="hidden" name="bgppb-form-action" value="default_editor">\n\t\t\t\t<input type="hidden" name="bgppb-form-action-nonce" value="'.concat(BoldgridEditor.bgppb_form_action_nonce,'">\n\t\t\t\t<h2>Preferred Editor</h2>\n\t\t\t\t<p>\n\t\t\t\t\tChoose the preferred way to edit your content.\n\t\t\t\t\tYou can also choose an editor for a specific post by selecting it within the\n\t\t\t\t\teditor. To learn more about your choices visit our\n\t\t\t\t\t<a target="_blank" href="').concat(BoldgridEditor.plugin_configs.urls.support_default_editor,'">support article</a>.\n\t\t\t\t</p>\n\t\t\t\t<div class="post-type-category native">\n\t\t\t\t\t<h4>WordPress Post Types</h4>\n\t\t\t\t\t<mat-menu name="post" label="Posts"></mat-menu>\n\t\t\t\t\t<mat-menu name="page" label="Pages"></mat-menu>\n\t\t\t\t</div>\n\t\t\t\t<div class="post-type-category cpt">\n\t\t\t\t\t<h4>Custom Post Types</h4>\n\t\t\t\t\t').concat(this._getCPTInputs(),'\n\t\t\t\t</div>\n\t\t\t\t<div class="action-buttons">\n\t\t\t\t\t<button class="button-primary">Submit</button>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t')}},{key:"_getCPTInputs",value:function(){return BoldgridEditor.customPostTypes.map((function(t){return'<mat-menu name="'.concat(t.value,'" label="').concat(t.label,'"></mat-menu>')})).join("")}}])&&ae(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),ce=n(5311);function de(t){return de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},de(t)}function le(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==de(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==de(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===de(o)?o:String(o)),i)}var o}(new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.banner=new o,this.defaultEditor=new ue,this.$page=ce(".bgppb-page--settings .bg-content"),this.title="Post and Page Builder Settings",this.description="Configuration options for the BoldGrid Post and Page Builder"}var e,n;return e=t,(n=[{key:"init",value:function(){this.setPageHTML()}},{key:"setPageHTML",value:function(){this.$page.find("bgppb-settings-view").replaceWith("\n\t\t\t".concat(this.banner.getHTML(this.title,this.description),'\n\t\t\t<div class="bgppb-page__body">\n\t\t\t\t').concat(BoldgridEditor.cards.premium,"\n\t\t\t\t").concat(BoldgridEditor.cards.editor,"\n\t\t\t</div>\n\t\t")),this.$page.find("#bgppb_preferred_editor .bglib-card-footer").html(this.defaultEditor.getForm())}}])&&le(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}())).init()}()}();