diff --git a/lib/mdl-ext.js b/lib/mdl-ext.js index 22ffc50..f7d38ca 100644 --- a/lib/mdl-ext.js +++ b/lib/mdl-ext.js @@ -2383,7 +2383,13 @@ return /******/ (function(modules) { // webpackBootstrap } else if (event.keyCode === _constants.VK_PAGE_DOWN) { action = 'scroll-next'; } - this.command_(action); + + var cmd = new CustomEvent('select', { + detail: { + action: action + } + }); + this.command_(cmd); } else if (event.keyCode === _constants.VK_TAB || event.keyCode === _constants.VK_ENTER || event.keyCode === _constants.VK_SPACE || event.keyCode === _constants.VK_ARROW_UP || event.keyCode === _constants.VK_ARROW_LEFT || event.keyCode === _constants.VK_ARROW_DOWN || event.keyCode === _constants.VK_ARROW_RIGHT) { var slide = getSlide_(event.target); @@ -3796,7 +3802,9 @@ return /******/ (function(modules) { // webpackBootstrap } }; - var dialog = lightboxElement.parentNode.nodeName === 'DIALOG' ? lightboxElement.parentNode : null; + var p = lightboxElement.parentNode; + var dialog = p && p.nodeName === 'DIALOG' ? p : null; + if (dialog && dialog.hasAttribute('open')) { lightboxElement.style.width = 'auto'; lightboxElement.style.maxWidth = '100%'; diff --git a/lib/mdl-ext.js.map b/lib/mdl-ext.js.map index fb86bfb..28748da 100644 --- a/lib/mdl-ext.js.map +++ b/lib/mdl-ext.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition?5ca6","webpack:///webpack/bootstrap 8f94bad186493d80a1e1?cc9d","webpack:///./~/core-js/library/modules/_core.js?1b62","webpack:///./src/utils/constants.js?14df","webpack:///./~/core-js/library/modules/_export.js?ece2","webpack:///./~/core-js/library/modules/_wks.js?3027","webpack:///./~/core-js/library/modules/_global.js?77aa","webpack:///./~/core-js/library/modules/_an-object.js?0da3","webpack:///./~/core-js/library/modules/_iterators.js?aff7","webpack:///./~/babel-runtime/helpers/toConsumableArray.js?1825","webpack:///./~/core-js/library/modules/_descriptors.js?7051","webpack:///./~/core-js/library/modules/_fails.js?935d","webpack:///./~/core-js/library/modules/_hide.js?a6da","webpack:///./~/core-js/library/modules/_object-dp.js?4116","webpack:///./src/utils/full-throttle.js?dc07","webpack:///./src/utils/string-utils.js?37f8","webpack:///./~/core-js/library/modules/_has.js?d850","webpack:///./~/core-js/library/modules/_is-object.js?24c8","webpack:///./~/core-js/library/modules/_object-keys.js?f5bc","webpack:///./~/core-js/library/modules/_to-iobject.js?6946","webpack:///./~/core-js/library/modules/_to-object.js?b5c0","webpack:///./src/utils/dom-utils.js?0816","webpack:///./src/utils/json-utils.js?45f0","webpack:///./~/core-js/library/modules/_defined.js?45d3","webpack:///./~/core-js/library/modules/_property-desc.js?1e86","webpack:///./~/core-js/library/modules/_shared-key.js?2a6c","webpack:///./~/core-js/library/modules/_to-integer.js?f65f","webpack:///./~/core-js/library/modules/es6.string.iterator.js?fe18","webpack:///./src/utils/easing.js?f6e9","webpack:///./src/utils/interval-function.js?c7e7","webpack:///./~/babel-runtime/core-js/get-iterator.js?1b08","webpack:///./~/babel-runtime/core-js/number/is-integer.js?14ca","webpack:///./~/babel-runtime/core-js/object/assign.js?e6ca","webpack:///./~/babel-runtime/helpers/classCallCheck.js?21af","webpack:///./~/babel-runtime/helpers/createClass.js?1dfe","webpack:///./~/core-js/library/modules/_a-function.js?d53e","webpack:///./~/core-js/library/modules/_classof.js?b4b3","webpack:///./~/core-js/library/modules/_cof.js?48ea","webpack:///./~/core-js/library/modules/_ctx.js?ce00","webpack:///./~/core-js/library/modules/_dom-create.js?ab44","webpack:///./~/core-js/library/modules/_enum-bug-keys.js?7598","webpack:///./~/core-js/library/modules/_iobject.js?5cf9","webpack:///./~/core-js/library/modules/_iter-define.js?9a94","webpack:///./~/core-js/library/modules/_object-pie.js?d0d2","webpack:///./~/core-js/library/modules/_set-to-string-tag.js?c945","webpack:///./~/core-js/library/modules/_shared.js?7b6c","webpack:///./~/core-js/library/modules/_to-length.js?62a7","webpack:///./~/core-js/library/modules/_uid.js?e8cd","webpack:///./~/core-js/library/modules/core.get-iterator-method.js?9c88","webpack:///./~/core-js/library/modules/web.dom.iterable.js?bf0e","webpack:///./src/accordion/accordion.js?021c","webpack:///./src/carousel/carousel.js?7189","webpack:///./src/collapsible/collapsible.js?8da8","webpack:///./src/index.js?9552","webpack:///./src/lightboard/lightboard.js?4a51","webpack:///./src/lightbox/lightbox.js?4a9b","webpack:///./src/menu-button/menu-button.js?292f","webpack:///./src/selectfield/selectfield.js?4310","webpack:///./src/sticky-header/sticky-header.js?0ce9","webpack:///./src/utils/index.js?d310","webpack:///./~/babel-runtime/core-js/array/from.js?efc2","webpack:///./~/babel-runtime/core-js/is-iterable.js?350e","webpack:///./~/babel-runtime/core-js/number/is-nan.js?f039","webpack:///./~/babel-runtime/core-js/object/define-property.js?5f70","webpack:///./~/babel-runtime/core-js/object/entries.js?41f9","webpack:///./~/babel-runtime/core-js/object/keys.js?fe06","webpack:///./~/babel-runtime/core-js/reflect/apply.js?a3c1","webpack:///./~/babel-runtime/helpers/slicedToArray.js?39c4","webpack:///./~/core-js/library/fn/array/from.js?669d","webpack:///./~/core-js/library/fn/get-iterator.js?2cf7","webpack:///./~/core-js/library/fn/is-iterable.js?0bd2","webpack:///./~/core-js/library/fn/number/is-integer.js?0be2","webpack:///./~/core-js/library/fn/number/is-nan.js?fc65","webpack:///./~/core-js/library/fn/object/assign.js?80e4","webpack:///./~/core-js/library/fn/object/define-property.js?b7d8","webpack:///./~/core-js/library/fn/object/entries.js?390f","webpack:///./~/core-js/library/fn/object/keys.js?cc3f","webpack:///./~/core-js/library/fn/reflect/apply.js?caa0","webpack:///./~/core-js/library/modules/_add-to-unscopables.js?d5e8","webpack:///./~/core-js/library/modules/_array-includes.js?6199","webpack:///./~/core-js/library/modules/_create-property.js?1ad1","webpack:///./~/core-js/library/modules/_html.js?e5af","webpack:///./~/core-js/library/modules/_ie8-dom-define.js?bd1f","webpack:///./~/core-js/library/modules/_is-array-iter.js?a4b3","webpack:///./~/core-js/library/modules/_is-integer.js?0b73","webpack:///./~/core-js/library/modules/_iter-call.js?5189","webpack:///./~/core-js/library/modules/_iter-create.js?0127","webpack:///./~/core-js/library/modules/_iter-detect.js?0a91","webpack:///./~/core-js/library/modules/_iter-step.js?e209","webpack:///./~/core-js/library/modules/_library.js?2c80","webpack:///./~/core-js/library/modules/_object-assign.js?5c0c","webpack:///./~/core-js/library/modules/_object-create.js?d8cf","webpack:///./~/core-js/library/modules/_object-dps.js?47fd","webpack:///./~/core-js/library/modules/_object-gops.js?a5fb","webpack:///./~/core-js/library/modules/_object-gpo.js?d47d","webpack:///./~/core-js/library/modules/_object-keys-internal.js?fcea","webpack:///./~/core-js/library/modules/_object-sap.js?a03e","webpack:///./~/core-js/library/modules/_object-to-array.js?ae83","webpack:///./~/core-js/library/modules/_redefine.js?1455","webpack:///./~/core-js/library/modules/_string-at.js?413a","webpack:///./~/core-js/library/modules/_to-index.js?9fd4","webpack:///./~/core-js/library/modules/_to-primitive.js?49a4","webpack:///./~/core-js/library/modules/core.get-iterator.js?aca7","webpack:///./~/core-js/library/modules/core.is-iterable.js?77cc","webpack:///./~/core-js/library/modules/es6.array.from.js?ce7d","webpack:///./~/core-js/library/modules/es6.array.iterator.js?1e09","webpack:///./~/core-js/library/modules/es6.number.is-integer.js?bf65","webpack:///./~/core-js/library/modules/es6.number.is-nan.js?a1c1","webpack:///./~/core-js/library/modules/es6.object.assign.js?9007","webpack:///./~/core-js/library/modules/es6.object.define-property.js?c82c","webpack:///./~/core-js/library/modules/es6.object.keys.js?c98f","webpack:///./~/core-js/library/modules/es6.reflect.apply.js?b3cf","webpack:///./~/core-js/library/modules/es7.object.entries.js?86f8","webpack:///./src/mdl-ext-build.scss?16f6"],"names":["VK_TAB","VK_ENTER","VK_ESC","VK_SPACE","VK_PAGE_UP","VK_PAGE_DOWN","VK_END","VK_HOME","VK_ARROW_LEFT","VK_ARROW_UP","VK_ARROW_RIGHT","VK_ARROW_DOWN","ARIA_EXPANDED","ARIA_HIDDEN","ARIA_MULTISELECTABLE","ARIA_SELECTED","IS_DIRTY","IS_DISABLED","IS_EXPANDED","IS_FOCUSED","IS_INVALID","IS_UPGRADED","DATA_UPGRADED","MDL_RIPPLE","MDL_RIPPLE_COMPONENT","MDL_RIPPLE_EFFECT","MDL_RIPPLE_EFFECT_IGNORE_EVENTS","fullThrottle","callback","context","window","throttling","args","requestAnimationFrame","stringList","isString","str","flatten","list","reduce","a","b","concat","Array","isArray","objectToStrings","arg","filter","key","map","result","joinStrings","delimiter","join","randomString","n","Math","random","toString","slice","removeChildElements","element","forceReflow","lastChild","removeChild","d","style","display","moveElements","source","target","ownerDocument","createDocumentFragment","firstChild","appendChild","getWindowViewport","viewportWidth","max","document","documentElement","clientWidth","innerWidth","viewportHeight","clientHeight","innerHeight","isRectInsideWindowViewport","top","left","bottom","right","getScrollParents","elements","el","parentNode","cs","getComputedStyle","overflowY","overflowX","unshift","body","getParentElements","from","to","tether","controlledBy","controlRect","getBoundingClientRect","height","offsetHeight","width","offsetWidth","elementRect","dy","dx","ddy","ddx","r","offsetTop","offsetLeft","isFocusable","hasAttribute","tabindex","getAttribute","parseInt","selector","name","nodeName","test","type","toLowerCase","disabled","href","getPropertyValue","jsonStringToObject","jsonString","s","replace","JSON","parse","e","Error","message","easeInOutQuad","t","c","inOutQuintic","ts","tc","MIN_INERVAL","intervalFunction","interval","lapse","cb","undefined","next","timeElapsed","execute","f","cancel","cancelAnimationFrame","start","timeStart","Date","now","loop","started","value","TypeError","immediate","ReferenceError","stop","ACCORDION","ACCORDION_VERTICAL","ACCORDION_HORIZONTAL","PANEL","PANEL_ROLE","TAB","TAB_CAPTION","TAB_ROLE","TABPANEL","TABPANEL_ROLE","RIPPLE_EFFECT","RIPPLE","ANIMATION_EFFECT","ANIMATION","MaterialExtAccordion","element_","init","accordionPanelElements","panel","tab","tabpanel","classList","contains","querySelector","prototype","commandHandler_","event","preventDefault","stopPropagation","detail","command","dispatchToggleEvent_","state","ce","CustomEvent","bubbles","cancelable","dispatchEvent","openTab_","add","setAttribute","removeAttribute","closeTab_","remove","toggleTab_","closeTabs_","openTabs_","querySelectorAll","forEach","closedItem","upgradeTab","tabElement","disableTab","enableTab","calcMaxTabCaptionWidth","tabCaption","w","children","v","maxWidth","selectTab","selectedTab","tabClickHandler","tabFocusHandler","tabpanelClickHandler","tabpanelFocusHandler","tabKeydownHandler","keyCode","nextTab","nextPanel","previousElementSibling","nextElementSibling","focus","removeEventListener","addEventListener","openTab","closeTab","toggleTab","action","bind","componentHandler","register","constructor","classAsString","cssClass","widget","MDL_RIPPLE_CONTAINER","SLIDE","ROLE","SLIDE_ROLE","MaterialExtCarousel","config_","interactive","autostart","animationLoop","scrollAnimation_","startSlideShow_","nextSlide","slide","animateScroll_","moveSlideIntoViewport_","emitSelectEvent_","nextScroll","nextDirection","direction","scrollLeft","scrollWidth","x","min","cancelSlideShow_","newPosition","newDuration","completedCallback","distance","duration","abs","command_","setAriaSelected_","slides","getSlidesInViewport_","length","keyDownHandler_","getSlide_","shiftKey","setFocus_","dragHandler_","updating","rAFDragId","startX","clientX","touches","prevX","targetElement","update","currentX","drag","endDrag","clickHandler_","focusHandler_","blurHandler_","evt","carouselRect","slidesInViewport","slideRect","removeListeners_","mdlDowngrade_","closest","addRipple_","rippleContainer","createElement","ripple","img","title","upgradeElement","stopAnimation","upgradeSlides","hasRippleEffect","getConfig","JS_COLLAPSIBLE","COLLAPSIBLE_CONTROL_CLASS","COLLAPSIBLE_REGION_CLASS","Collapsible","controlElement_","keyDownHandler","controlElement","MouseEvent","view","clickHandler","isDisabled","p","push","find","toggle","isExpanded","dispatchToggleEvent","regions","regionElements","i","region","collapse","expand","regionId","ids","regionIds","id","addRegionId","initControl","initRegions","addRegionElement","addListeners","removeListeners","split","MaterialExtCollapsible","collapsible","downgrade","getControlElement","getRegionElements","addRegionElements","removeRegionElements","removeRegionElement","disableToggle","enableToggle","LIGHTBOARD_ROLE","SLIDE_TABSTOP","MaterialExtLightboard","getSlide","selectSlide_","selectedSlide","dispatchSelectEvent_","addRipple","firstSlide","lastSlide","prevSlide","keydownHandler","focusHandler","LIGHTBOX","LIGHTBOX_SLIDER","LIGHTBOX_SLIDER_SLIDE","STICKY_FOOTER","BUTTON","MaterialExtLightbox","dispatchAction_","buttonClickHandler_","repositionDialog_","footerHeight","footer","isSticky","reposition","dialog","fh","position","scrollTop","topValue","lightboxElement","naturalWidth","vh","imgLoadHandler_","imgDragHandler_","setStyles","properties","opacity","slider","textContent","src","button","figcaption","JS_MENU_BUTTON","MENU_BUTTON_MENU","MENU_BUTTON_MENU_ITEM","MENU_BUTTON_MENU_ITEM_SEPARATOR","menuFactory","ariaControls","removeAllSelected","selectedItem","setSelected","item","force","getSelected","isSeparator","nextItem","current","firstElementChild","previousItem","lastElementChild","firstItem","lastItem","selectItem","close","blurHandler","relatedTarget","explicitOriginalTarget","activeElement","shouldClose","err","touchStartHandler","open","btn","forceFocus","addWaiAria","menuitem","selected","MenuButton","openMenu","closeMenu","recalcMenuPosition","focusElement","focusElementLastScrollPosition","parseFloat","menu","positionChangeHandler","closeMenuHandler","dispatchMenuSelect","scrollElements","addFocusElement","tagName","moveElementToDocumentBody","findMenuElement","menuElement","menuElementId","addMenu","componentInstance","related","indexOf","MaterialExtMenuButton","menuButton_","getMenuElement","getSelectedMenuItem","setSelectedMenuItem","LABEL","INPUT","MaterialExtSelectfield","onFocus_","onBlur_","onReset_","updateClasses_","checkDisabled","checkValidity","checkDirty","checkFocus","select_","Boolean","disable","enable","change","label_","invalid","MDL_LAYOUT_CONTENT","IS_SCROLL_CLASS","MaterialExtStickyHeader","header_","content_","lastScrollTop_","visibleAtScrollEnd","mutationObserver_","drawing_","recalcWidth_","throttleResize","self","resizeHandler_","reposition_","currentContentScrollTop","scrollDiff","headerTop","scrollHeight","throttleScroll","scrollHandler_","updatePosition_","addMutationObserver_","MutationObserver","observe","attributes","childList","characterData","subtree","disconnect","paddingTop"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;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A,oB;SACAC,a,GAAAA,a;SACAC,Q,GAAAA,Q;SACAC,W,GAAAA,W;SACAC,W,GAAAA,W;SACAC,U,GAAAA,U;SACAC,U,GAAAA,U;SACAC,W,GAAAA,W;SACAC,a,GAAAA,a;SACAC,U,GAAAA,U;SACAC,oB,GAAAA,oB;SACAC,iB,GAAAA,iB;SACAC,+B,GAAAA,+B;;;;;;AC5DF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAmE;AACnE;AACA,sFAAqF;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX,UAAS;AACT;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,gDAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,eAAc;AACd,eAAc;AACd,eAAc;AACd,eAAc;AACd,gBAAe;AACf,gBAAe;AACf,gBAAe;AACf,iBAAgB;AAChB,0B;;;;;;AC5DA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,wB;;;;;;ACVA;AACA;AACA;AACA,wCAAuC,gC;;;;;;ACHvC;AACA;AACA;AACA;AACA,G;;;;;;ACJA,qB;;;;;;ACAA;;AAEA;;AAEA;;AAEA;;AAEA,uCAAsC,uCAAuC,gBAAgB;;AAE7F;AACA;AACA,8CAA6C,gBAAgB;AAC7D;AACA;;AAEA;AACA,IAAG;AACH;AACA;AACA,G;;;;;;ACpBA;AACA;AACA,kCAAiC,QAAQ,gBAAgB,UAAU,GAAG;AACtE,EAAC,E;;;;;;ACHD;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,G;;;;;;ACNA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA,G;;;;;;ACPA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG,UAAU;AACb;AACA;AACA;AACA,G;;;;;;;;;;;;;;;;;;AC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AAM,IAAIiB,cAAJ,CAAmB,iEAAnB,CAAN;AACD;AACDb;AACD,MAtBI;;AAuBLc,WAAM;AAAA,cAAMZ,QAAN;AAAA;AAvBD,IAAP;AAyBD,EAxED;;mBA0EeT,gB;;;;;;;AClFf,mBAAkB,wD;;;;;;ACAlB,mBAAkB,wD;;;;;;ACAlB,mBAAkB,wD;;;;;;ACAlB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,G;;;;;;ACRA;;AAEA;;AAEA;;AAEA;;AAEA,uCAAsC,uCAAuC,gBAAgB;;AAE7F;AACA;AACA,oBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAC,G;;;;;;AC1BD;AACA;AACA;AACA,G;;;;;;ACHA;AACA;AACA;AACA;AACA,0BAAyB,kBAAkB,EAAE;;AAE7C;AACA;AACA;AACA;AACA,IAAG,UAAU;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACtBA,kBAAiB;;AAEjB;AACA;AACA,G;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACNA;AACA;AACA;AACA,c;;;;;;ACHA;AACA;AACA;AACA;AACA,G;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAA4B,aAAa;;AAEzC;AACA;AACA;AACA;AACA;AACA,yCAAwC,oCAAoC;AAC5E,6CAA4C,oCAAoC;AAChF,MAAK,2BAA2B,oCAAoC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB,mBAAmB;AACnC;AACA;AACA,kCAAiC,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A0B;AAC/E;AACA,G;;;;;;ACZA;AACA;;AAEA;AACA;AACA,gCAA+B,qBAAqB;AACpD,gCAA+B,SAAS,EAAE;AAC1C,EAAC,UAAU;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA,4BAA2B,SAAS,mBAAmB;AACvD,gCAA+B,aAAa;AAC5C;AACA,IAAG,UAAU;AACb;AACA,G;;;;;;ACpBA;AACA,WAAU;AACV,G;;;;;;ACFA,uB;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC,UAAU,EAAE;AAC9C,oBAAmB,sCAAsC;AACzD,EAAC,oCAAoC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,EAAC,W;;;;;;AChCD;AACA;AACA;AACA;AACA;AACA,8BAA6B;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;;;;;;ACxCA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACZA,0C;;;;;;ACAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,G;;;;;;ACZA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA,+BAA8B;AAC9B;AACA;AACA,oDAAmD,OAAO,EAAE;AAC5D,G;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,G;;;;;;ACfA,0C;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yEAA0E,kBAAkB,EAAE;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAoD,gCAAgC;AACpF;AACA;AACA,MAAK;AACL;AACA,kCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;;;;;ACpCD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iCAAgC;AAChC,eAAc;AACd,kBAAiB;AACjB;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;;AAEA;AACA;AACA,6B;;;;;;ACjCA;AACA;;AAEA,+BAA8B,mCAAoC,E;;;;;;ACHlE;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACPD;AACA;;AAEA,2CAA0C,gCAAoC,E;;;;;;ACH9E;AACA;AACA,qEAAuE,0CAA0C,E;;;;;;ACFjH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACRD;AACA;AACA;AACA;AACA,sDAAmD;AACnD;AACA;AACA;AACA,sBAAqB;AACrB,EAAC;AACD;AACA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACfD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,E;;;;;;ACRD,0C","file":"mdl-ext.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"mdl-ext\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"mdl-ext\"] = factory();\n\telse\n\t\troot[\"mdl-ext\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition\n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 8f94bad186493d80a1e1\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 8f94bad186493d80a1e1","var core = module.exports = {version: '2.4.0'};\nif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_core.js\n// module id = 1\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_core.js\n// module id = 1\n// module chunks = 0 1","'use strict';\n\nconst VK_TAB = 9;\nconst VK_ENTER = 13;\nconst VK_ESC = 27;\nconst VK_SPACE = 32;\nconst VK_PAGE_UP = 33;\nconst VK_PAGE_DOWN = 34;\nconst VK_END = 35;\nconst VK_HOME = 36;\nconst VK_ARROW_LEFT = 37;\nconst VK_ARROW_UP = 38;\nconst VK_ARROW_RIGHT = 39;\nconst VK_ARROW_DOWN = 40;\n\nconst ARIA_EXPANDED = 'aria-expanded';\nconst ARIA_HIDDEN = 'aria-hidden';\nconst ARIA_MULTISELECTABLE = 'aria-multiselectable';\nconst ARIA_SELECTED = 'aria-selected';\n\nconst IS_DIRTY = 'is-dirty';\nconst IS_DISABLED = 'is-disabled';\nconst IS_EXPANDED = 'is-expanded';\nconst IS_FOCUSED = 'is-focused';\nconst IS_INVALID = 'is-invalid';\nconst IS_UPGRADED = 'is-upgraded';\nconst DATA_UPGRADED = 'data-upgraded';\n\nconst MDL_RIPPLE = 'mdl-ripple';\nconst MDL_RIPPLE_COMPONENT = 'MaterialRipple';\nconst MDL_RIPPLE_EFFECT = 'mdl-js-ripple-effect';\nconst MDL_RIPPLE_EFFECT_IGNORE_EVENTS = 'mdl-js-ripple-effect--ignore-events';\n\nexport {\n VK_TAB,\n VK_ENTER,\n VK_ESC,\n VK_SPACE,\n VK_PAGE_UP,\n VK_PAGE_DOWN ,\n VK_END,\n VK_HOME,\n VK_ARROW_LEFT,\n VK_ARROW_UP,\n VK_ARROW_RIGHT,\n VK_ARROW_DOWN ,\n ARIA_EXPANDED,\n ARIA_HIDDEN,\n ARIA_MULTISELECTABLE,\n ARIA_SELECTED,\n IS_DIRTY,\n IS_DISABLED,\n IS_EXPANDED,\n IS_FOCUSED,\n IS_INVALID,\n IS_UPGRADED,\n DATA_UPGRADED ,\n MDL_RIPPLE,\n MDL_RIPPLE_COMPONENT,\n MDL_RIPPLE_EFFECT,\n MDL_RIPPLE_EFFECT_IGNORE_EVENTS\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/constants.js\n\n\n// WEBPACK FOOTER //\n// ./src/utils/constants.js","var global = require('./_global')\n , core = require('./_core')\n , ctx = require('./_ctx')\n , hide = require('./_hide')\n , PROTOTYPE = 'prototype';\n\nvar $export = function(type, name, source){\n var IS_FORCED = type & $export.F\n , IS_GLOBAL = type & $export.G\n , IS_STATIC = type & $export.S\n , IS_PROTO = type & $export.P\n , IS_BIND = type & $export.B\n , IS_WRAP = type & $export.W\n , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})\n , expProto = exports[PROTOTYPE]\n , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]\n , key, own, out;\n if(IS_GLOBAL)source = name;\n for(key in source){\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if(own && key in exports)continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function(C){\n var F = function(a, b, c){\n if(this instanceof C){\n switch(arguments.length){\n case 0: return new C;\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if(IS_PROTO){\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library` \nmodule.exports = $export;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_export.js\n// module id = 3\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_export.js\n// module id = 3\n// module chunks = 0 1","var store = require('./_shared')('wks')\n , uid = require('./_uid')\n , Symbol = require('./_global').Symbol\n , USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function(name){\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_wks.js\n// module id = 4\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_wks.js\n// module id = 4\n// module chunks = 0 1","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\nif(typeof __g == 'number')__g = global; // eslint-disable-line no-undef\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_global.js\n// module id = 5\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_global.js\n// module id = 5\n// module chunks = 0 1","var isObject = require('./_is-object');\nmodule.exports = function(it){\n if(!isObject(it))throw TypeError(it + ' is not an object!');\n return it;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_an-object.js\n// module id = 6\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_an-object.js\n// module id = 6\n// module chunks = 0 1","module.exports = {};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_iterators.js\n// module id = 7\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_iterators.js\n// module id = 7\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _from = require(\"../core-js/array/from\");\n\nvar _from2 = _interopRequireDefault(_from);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n } else {\n return (0, _from2.default)(arr);\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/helpers/toConsumableArray.js\n// module id = 8\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/helpers/toConsumableArray.js\n// module id = 8\n// module chunks = 0 1","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function(){\n return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_descriptors.js\n// module id = 9\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_descriptors.js\n// module id = 9\n// module chunks = 0 1","module.exports = function(exec){\n try {\n return !!exec();\n } catch(e){\n return true;\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_fails.js\n// module id = 10\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_fails.js\n// module id = 10\n// module chunks = 0 1","var dP = require('./_object-dp')\n , createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function(object, key, value){\n return dP.f(object, key, createDesc(1, value));\n} : function(object, key, value){\n object[key] = value;\n return object;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_hide.js\n// module id = 11\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_hide.js\n// module id = 11\n// module chunks = 0 1","var anObject = require('./_an-object')\n , IE8_DOM_DEFINE = require('./_ie8-dom-define')\n , toPrimitive = require('./_to-primitive')\n , dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes){\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if(IE8_DOM_DEFINE)try {\n return dP(O, P, Attributes);\n } catch(e){ /* empty */ }\n if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');\n if('value' in Attributes)O[P] = Attributes.value;\n return O;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_object-dp.js\n// module id = 12\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_object-dp.js\n// module id = 12\n// module chunks = 0 1","/**\n * Since some events can fire at a high rate, the event handler should be limited to execute computationally\n * expensive operations, such as DOM modifications, inside a single rendered frame.\n * When listening to e.g. scroll and resize events, the browser tends to fire off more events per\n * second than are actually useful. For instance, if your event listener sets some element positions, then it\n * is possible for those positions to be updated multiple times in a single rendered frame. In this case, all of\n * the layout calculations triggered by setting the elements' positions will be wasted except for the one time that\n * it runs immediately prior to the browser rendering the updated layout to the screen.\n * To avoid wasting cycles, we can use requestAnimationFrame to only run the event listener once just before the page\n * is rendered to the screen.\n * *\n * @param callback the function to throttle\n * @param context optional context of this, default to global\n * @return {function(...[*])}\n */\nconst fullThrottle = (callback, context) => {\n\n if (!context) {\n context = this || window;\n }\n\n let throttling = false;\n\n return (...args) => {\n if(!throttling) {\n throttling = true;\n window.requestAnimationFrame( () => {\n throttling = false;\n return Reflect.apply(callback, context, args);\n });\n }\n };\n};\n\nexport default fullThrottle;\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/full-throttle.js\n\n\n// WEBPACK FOOTER //\n// ./src/utils/full-throttle.js","'use strict';\n\n/**\n * @license\n * Copyright 2016 Leif Olsen. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * A javascript utility for conditionally creating a list of strings.\n * The function takes any number of arguments which can be a string or object.\n * Inspired by (but not copied from) JedWatson/classnames, https://github.com/JedWatson/classnames\n *\n * @param {*} args the strings and/or objects to\n * @return {Array} a list of strings\n * @example\n * // Returns ['foo', 'bar', 'baz', 'quux']\n * stringList(', ', 'foo', { bar: true, duck: false }, 'baz', { quux: true });\n * @example see the tests for more examples\n */\nconst stringList = (...args) => {\n\n const isString = str => str != null && typeof str === 'string';\n\n const flatten = list => list.reduce((a, b) => a.concat(Array.isArray(b) ? flatten(b) : b), []);\n\n const objectToStrings = arg =>\n Object.keys(arg)\n .filter(key => arg[key])\n .map(key => key);\n\n return args\n .filter(arg => !!arg)\n .map(arg => isString(arg) ? arg : objectToStrings(arg))\n .reduce((result, arg) => result.concat(Array.isArray(arg) ? flatten(arg) : arg), []);\n};\n\n/**\n * A simple javascript utility for conditionally joining strings together.\n * The function takes a delimiter string and any number of arguments which can be a string or object.\n *\n * @param delimiter delimiter to separate joined strings\n * @param {*} args the strings and/or objects to join\n * @return {String} the joined strings\n * @example\n * // Returns 'foo, bar, baz, quux'\n * joinStrings(', ', 'foo', { bar: true, duck: false }, 'baz', { quux: true });\n * @example see the tests for more examples\n */\nconst joinStrings = (delimiter = ' ', ...args) => stringList(...args).join(delimiter);\n\n/**\n * Generates a random string with a given length\n * @param n {Integer} length of generated string\n * @see http://stackoverflow.com/questions/1349404/generate-random-string-characters-in-javascript\n * @return {String} the random string\n * @example\n * // Returns e.g. 'pd781w0y'\n * randomString(8);\n * @example see the tests for more examples\n */\nconst randomString = ( n=12 ) => Array( n+1 ).join((`${Math.random().toString(36)}00000000000000000`).slice(2, 18)).slice(0, n);\n\nexport { joinStrings, randomString, stringList };\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/string-utils.js\n\n\n// WEBPACK FOOTER //\n// ./src/utils/string-utils.js","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function(it, key){\n return hasOwnProperty.call(it, key);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_has.js\n// module id = 15\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_has.js\n// module id = 15\n// module chunks = 0 1","module.exports = function(it){\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_is-object.js\n// module id = 16\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_is-object.js\n// module id = 16\n// module chunks = 0 1","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal')\n , enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O){\n return $keys(O, enumBugKeys);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_object-keys.js\n// module id = 17\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_object-keys.js\n// module id = 17\n// module chunks = 0 1","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject')\n , defined = require('./_defined');\nmodule.exports = function(it){\n return IObject(defined(it));\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_to-iobject.js\n// module id = 18\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_to-iobject.js\n// module id = 18\n// module chunks = 0 1","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function(it){\n return Object(defined(it));\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_to-object.js\n// module id = 19\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_to-object.js\n// module id = 19\n// module chunks = 0 1","/**\n * Remove child element(s)\n * element.innerHTNL = '' has a performance penality!\n * @see http://jsperf.com/empty-an-element/16\n * @see http://jsperf.com/force-reflow\n * @param element\n * @param forceReflow\n */\nconst removeChildElements = (element, forceReflow = true) => {\n\n // See: http://jsperf.com/empty-an-element/16\n while (element.lastChild) {\n element.removeChild(element.lastChild);\n }\n if(forceReflow) {\n // See: http://jsperf.com/force-reflow\n const d = element.style.display;\n\n element.style.display = 'none';\n element.style.display = d;\n }\n};\n\n/**\n * Moves child elements from a DOM node to another dom node.\n * @param source {HTMLElement}\n * @param target {HTMLElement} If the target parameter is ommited, a document fragment is created\n * @return {HTMLElement} The target node\n *\n * @example\n * // Moves child elements from a DOM node to another dom node.\n * moveElements(source, destination);\n *\n * @example\n * // If the second parameter is ommited, a document fragment is created:\n * let fragment = moveElements(source);\n *\n * @See: https://github.com/webmodules/dom-move\n */\nconst moveElements = (source, target) => {\n if (!target) {\n target = source.ownerDocument.createDocumentFragment();\n }\n while (source.firstChild) {\n target.appendChild(source.firstChild);\n }\n return target;\n};\n\n\n/**\n * Get the browser viewport dimensions\n * @see http://stackoverflow.com/questions/1248081/get-the-browser-viewport-dimensions-with-javascript\n * @return {{windowWidth: number, windowHeight: number}}\n */\nconst getWindowViewport = () => {\n return {\n viewportWidth: Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0),\n viewportHeight: Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0)\n };\n};\n\n\n/**\n * Check whether an element is in the window viewport\n * @see http://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport/\n * @param top\n * @param left\n * @param bottom\n * @param right\n * @return {boolean} true if rectangle is inside window viewport, otherwise false\n */\nconst isRectInsideWindowViewport = ({ top, left, bottom, right }) => {\n const { viewportWidth, viewportHeight } = getWindowViewport();\n return top >= 0 &&\n left >= 0 &&\n bottom <= viewportHeight &&\n right <= viewportWidth;\n};\n\n\n/**\n * Get a list of parent elements that can possibly scroll\n * @param el the element to get parents for\n * @returns {Array}\n */\nconst getScrollParents = el => {\n const elements = [];\n\n /*\n for (el = el.parentNode; el; el = el.parentNode) {\n const cs = window.getComputedStyle(el);\n if(!(cs.overflowY === 'hidden' && cs.overflowX === 'hidden')) {\n elements.unshift(el);\n }\n if(el === document.body) {\n break;\n }\n }\n */\n\n let element = el.parentNode;\n while (element) {\n const cs = window.getComputedStyle(element);\n if(!(cs.overflowY === 'hidden' && cs.overflowX === 'hidden')) {\n elements.unshift(element);\n }\n if(element === document.body) {\n break;\n }\n element = element.parentNode;\n }\n\n return elements;\n};\n\n/**\n * Get a list of parent elements, from a given element to a given element\n * @param {HTMLElement} from\n * @param {HTMLElement} to\n * @return {Array} the parent elements, not including from and to\n */\nconst getParentElements = (from, to) => {\n const result = [];\n let element = from.parentNode;\n while (element) {\n if(element === to) {\n break;\n }\n result.unshift(element);\n element = element.parentNode;\n }\n return result;\n};\n\n/**\n * Position element next to button\n *\n * Positioning strategy\n * 1. element.height > viewport.height\n * let element.height = viewport.heigt\n * let element.overflow-y = auto\n * 2. element.width > viewport.width\n * let element.width = viewport.width\n * 3. position element below button, align left edge of element with button left\n * done if element inside viewport\n * 4. position element below button, align right edge of element with button right\n * done if element inside viewport\n * 5. positions element above button, aligns left edge of element with button left\n * done if element inside viewport\n * 6. position element above the control element, aligned to its right.\n * done if element inside viewport\n * 7. position element at button right hand side, aligns element top with button top\n * done if element inside viewport\n * 8. position element at button left hand side, aligns element top with button top\n * done if element inside viewport\n * 9. position element inside viewport\n * 1. position element at viewport bottom\n * 2. position element at button right hand side\n * done if element inside viewport\n * 3. position element at button left hand side\n * done if element inside viewport\n * 4. position element at viewport right\n * 10. done\n *\n */\nconst tether = (controlledBy, element) => {\n const controlRect = controlledBy.getBoundingClientRect();\n\n // 1. will element height fit inside window viewport?\n const { viewportWidth, viewportHeight } = getWindowViewport();\n\n element.style.height = 'auto';\n //element.style.overflowY = 'hidden';\n if(element.offsetHeight > viewportHeight) {\n element.style.height = `${viewportHeight}px`;\n element.style.overflowY = 'auto';\n }\n\n // 2. will element width fit inside window viewport?\n element.style.width = 'auto';\n if(element.offsetWidth > viewportWidth) {\n element.style.width = `${viewportWidth}px`;\n }\n\n const elementRect = element.getBoundingClientRect();\n\n // element to control distance\n const dy = controlRect.top - elementRect.top;\n const dx = controlRect.left - elementRect.left;\n\n // element rect, window coordinates relative to top,left of control\n const top = elementRect.top + dy;\n const left = elementRect.left + dx;\n const bottom = top + elementRect.height;\n const right = left + elementRect.width;\n\n // Position relative to control\n let ddy = dy;\n let ddx = dx;\n\n if(isRectInsideWindowViewport({\n top: top + controlRect.height,\n left: left,\n bottom: bottom + controlRect.height,\n right: right\n })) {\n // 3 position element below the control element, aligned to its left\n ddy = controlRect.height + dy;\n //console.log('***** 3');\n }\n else if(isRectInsideWindowViewport({\n top: top + controlRect.height,\n left: left + controlRect.width - elementRect.width,\n bottom: bottom + controlRect.height,\n right: left + controlRect.width\n })) {\n // 4 position element below the control element, aligned to its right\n ddy = controlRect.height + dy;\n ddx = dx + controlRect.width - elementRect.width;\n //console.log('***** 4');\n }\n else if(isRectInsideWindowViewport({\n top: top - elementRect.height,\n left: left,\n bottom: bottom - elementRect.height,\n right: right\n })) {\n // 5. position element above the control element, aligned to its left.\n ddy = dy - elementRect.height;\n //console.log('***** 5');\n }\n else if(isRectInsideWindowViewport({\n top: top - elementRect.height,\n left: left + controlRect.width - elementRect.width,\n bottom: bottom - elementRect.height,\n right: left + controlRect.width\n })) {\n // 6. position element above the control element, aligned to its right.\n ddy = dy - elementRect.height;\n ddx = dx + controlRect.width - elementRect.width;\n //console.log('***** 6');\n }\n else if(isRectInsideWindowViewport({\n top: top,\n left: left + controlRect.width,\n bottom: bottom,\n right: right + controlRect.width\n })) {\n // 7. position element at button right hand side\n ddx = controlRect.width + dx;\n //console.log('***** 7');\n }\n else if(isRectInsideWindowViewport({\n top: top,\n left: left - controlRect.width,\n bottom: bottom,\n right: right - controlRect.width\n })) {\n // 8. position element at button left hand side\n ddx = dx - elementRect.width;\n //console.log('***** 8');\n }\n else {\n // 9. position element inside viewport, near controlrect if possible\n //console.log('***** 9');\n\n // 9.1 position element near controlrect bottom\n ddy = dy - bottom + viewportHeight;\n if(top + controlRect.height >= 0 && bottom + controlRect.height <= viewportHeight) {\n ddy = controlRect.height + dy;\n }\n else if(top - elementRect.height >= 0 && bottom - elementRect.height <= viewportHeight) {\n ddy = dy - elementRect.height;\n }\n\n if(left + elementRect.width + controlRect.width <= viewportWidth) {\n // 9.2 Position element at button right hand side\n ddx = controlRect.width + dx;\n //console.log('***** 9.2');\n }\n else if(left - elementRect.width >= 0) {\n // 9.3 Position element at button left hand side\n ddx = dx - elementRect.width;\n //console.log('***** 9.3');\n }\n else {\n // 9.4 position element at (near) viewport right\n const r = left + elementRect.width - viewportWidth;\n ddx = dx - r;\n //console.log('***** 9.4');\n }\n }\n\n // 10. done\n element.style.top = `${element.offsetTop + ddy}px`;\n element.style.left = `${element.offsetLeft + ddx}px`;\n //console.log('***** 10. done');\n};\n\n/**\n * Check if the given element can receive focus\n * @param {HTMLElement} element the element to check\n * @return {boolean} true if the element is focusable, otherwise false\n */\nconst isFocusable = (element) => {\n // https://github.com/stephenmathieson/is-focusable/blob/master/index.js\n // http://stackoverflow.com/questions/1599660/which-html-elements-can-receive-focus\n\n if (element.hasAttribute('tabindex')) {\n const tabindex = element.getAttribute('tabindex');\n if (!Number.isNaN(tabindex)) {\n return parseInt(tabindex) > -1;\n }\n }\n\n if (element.hasAttribute('contenteditable') &&\n element.getAttribute('contenteditable') !== 'false') {\n // https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-contenteditable\n return true;\n }\n\n // natively focusable, but only when enabled\n const selector = /input|select|textarea|button|details/i;\n const name = element.nodeName;\n if (selector.test(name)) {\n return element.type.toLowerCase() !== 'hidden' && !element.disabled;\n }\n\n // anchors and area must have an href\n if (name === 'A' || name === 'AREA') {\n return !!element.href;\n }\n\n if (name === 'IFRAME') {\n // Check visible iframe\n const cs = window.getComputedStyle(element);\n return cs.getPropertyValue('display').toLowerCase() !== 'none';\n }\n\n return false;\n};\n\n\n/**\n * Get a list of offset parents for given element\n * @see https://www.benpickles.com/articles/51-finding-a-dom-nodes-common-ancestor-using-javascript\n * @param el the element\n * @return {Array} a list of offset parents\n */\n/*\nconst offsetParents = (el) => {\n const elements = [];\n for (; el; el = el.offsetParent) {\n elements.unshift(el);\n }\n if(!elements.find(e => e === document.body)) {\n elements.unshift(document.body);\n }\n return elements;\n};\n*/\n\n/**\n * Finds the common offset ancestor of two DOM nodes\n * @see https://www.benpickles.com/articles/51-finding-a-dom-nodes-common-ancestor-using-javascript\n * @see https://gist.github.com/benpickles/4059636\n * @param a\n * @param b\n * @return {Element} The common offset ancestor of a and b\n */\n/*\nconst commonOffsetAncestor = (a, b) => {\n const parentsA = offsetParents(a);\n const parentsB = offsetParents(b);\n\n for (let i = 0; i < parentsA.length; i++) {\n if (parentsA[i] !== parentsB[i]) return parentsA[i-1];\n }\n};\n*/\n\n/**\n * Calculate position relative to a target element\n * @see http://stackoverflow.com/questions/21064101/understanding-offsetwidth-clientwidth-scrollwidth-and-height-respectively\n * @param target\n * @param el\n * @return {{top: number, left: number}}\n */\n/*\nconst calcPositionRelativeToTarget = (target, el) => {\n let top = 0;\n let left = 0;\n\n while(el) {\n top += (el.offsetTop - el.scrollTop + el.clientTop) || 0;\n left += (el.offsetLeft - el.scrollLeft + el.clientLeft) || 0;\n el = el.offsetParent;\n\n if(el === target) {\n break;\n }\n }\n return { top: top, left: left };\n};\n*/\n\nexport {\n getWindowViewport,\n getParentElements,\n getScrollParents,\n isFocusable,\n isRectInsideWindowViewport,\n moveElements,\n removeChildElements,\n tether,\n};\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/dom-utils.js\n\n\n// WEBPACK FOOTER //\n// ./src/utils/dom-utils.js","'use strict';\n\n/**\n * Converts a JSON string to object\n * @param jsonString\n * @param source\n */\nconst jsonStringToObject = (jsonString, source = {} ) => {\n const s = jsonString.replace(/'/g, '\"');\n try {\n return Object.assign(source, JSON.parse(s));\n }\n catch (e) {\n throw new Error(`Failed to parse json string: ${s}. Error: ${e.message}`);\n }\n};\n\nexport { jsonStringToObject };\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/json-utils.js\n\n\n// WEBPACK FOOTER //\n// ./src/utils/json-utils.js","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function(it){\n if(it == undefined)throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_defined.js\n// module id = 22\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_defined.js\n// module id = 22\n// module chunks = 0 1","module.exports = function(bitmap, value){\n return {\n enumerable : !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable : !(bitmap & 4),\n value : value\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_property-desc.js\n// module id = 23\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_property-desc.js\n// module id = 23\n// module chunks = 0 1","var shared = require('./_shared')('keys')\n , uid = require('./_uid');\nmodule.exports = function(key){\n return shared[key] || (shared[key] = uid(key));\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_shared-key.js\n// module id = 24\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_shared-key.js\n// module id = 24\n// module chunks = 0 1","// 7.1.4 ToInteger\nvar ceil = Math.ceil\n , floor = Math.floor;\nmodule.exports = function(it){\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_to-integer.js\n// module id = 25\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_to-integer.js\n// module id = 25\n// module chunks = 0 1","'use strict';\nvar $at = require('./_string-at')(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\nrequire('./_iter-define')(String, 'String', function(iterated){\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function(){\n var O = this._t\n , index = this._i\n , point;\n if(index >= O.length)return {value: undefined, done: true};\n point = $at(O, index);\n this._i += point.length;\n return {value: point, done: false};\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/es6.string.iterator.js\n// module id = 26\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/es6.string.iterator.js\n// module id = 26\n// module chunks = 0 1","'use strict';\n\n// See: http://robertpenner.com/easing/\n\nconst easeInOutQuad = (t, b, c, d) => {\n t /= d / 2;\n if(t < 1) return c / 2 * t * t + b;\n t--;\n return -c / 2 * (t * (t - 2) - 1) + b;\n};\n\nconst inOutQuintic = (t, b, c, d) => {\n const ts = (t/=d)*t;\n const tc = ts*t;\n return b+c*(6*tc*ts + -15*ts*ts + 10*tc);\n};\n\nexport { easeInOutQuad, inOutQuintic };\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/easing.js\n\n\n// WEBPACK FOOTER //\n// ./src/utils/easing.js","const MIN_INERVAL = 1000/60;\n\n/**\n * Trigger a callback at a given interval\n * @param interval defaults to 1000/60 ms\n * @return {function()} reference to start, stop, immediate and started\n */\n\nconst intervalFunction = ( interval = MIN_INERVAL ) => {\n\n let lapse = interval < MIN_INERVAL ? MIN_INERVAL : interval;\n let cb = undefined;\n let next = null;\n let timeElapsed = 0;\n\n const execute = () => {\n const f = cb(timeElapsed);\n if (!f) {\n cancel();\n }\n };\n\n const cancel = () => {\n if(next) {\n window.cancelAnimationFrame(next);\n }\n next = null;\n timeElapsed = 0;\n };\n\n const start = () => {\n let timeStart = Date.now();\n\n const loop = now => {\n if (next) {\n next = window.requestAnimationFrame( () => loop( Date.now() ));\n\n timeElapsed += now - timeStart;\n\n if(timeElapsed >= lapse) {\n execute();\n if( (timeElapsed -= lapse) > lapse) {\n // time elapsed - interval_ > interval_ , indicates inactivity\n // Could be due to browser minimized, tab changed, screen saver started, computer sleep, and so on\n timeElapsed = 0;\n }\n }\n timeStart = now;\n }\n };\n\n next = 1; // a truthy value for first loop\n loop( timeStart );\n };\n\n return {\n get started() {\n return next != null;\n },\n get interval() {\n return lapse;\n },\n set interval(value) {\n lapse = value < MIN_INERVAL ? MIN_INERVAL : value;\n },\n start(callback) {\n if(typeof callback !== 'function') {\n throw new TypeError('callback parameter must be a function');\n }\n cb = callback;\n start();\n },\n immediate() {\n if(!cb) {\n throw new ReferenceError('callback parameter is not defined. Call start before immediate.');\n }\n execute();\n },\n stop: () => cancel(),\n };\n};\n\nexport default intervalFunction;\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/interval-function.js\n\n\n// WEBPACK FOOTER //\n// ./src/utils/interval-function.js","module.exports = { \"default\": require(\"core-js/library/fn/get-iterator\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/core-js/get-iterator.js\n// module id = 29\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/core-js/get-iterator.js\n// module id = 29\n// module chunks = 0 1","module.exports = { \"default\": require(\"core-js/library/fn/number/is-integer\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/core-js/number/is-integer.js\n// module id = 30\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/core-js/number/is-integer.js\n// module id = 30\n// module chunks = 0 1","module.exports = { \"default\": require(\"core-js/library/fn/object/assign\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/core-js/object/assign.js\n// module id = 31\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/core-js/object/assign.js\n// module id = 31\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/helpers/classCallCheck.js\n// module id = 32\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/helpers/classCallCheck.js\n// module id = 32\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _defineProperty = require(\"../core-js/object/define-property\");\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n (0, _defineProperty2.default)(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/helpers/createClass.js\n// module id = 33\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/helpers/createClass.js\n// module id = 33\n// module chunks = 0 1","module.exports = function(it){\n if(typeof it != 'function')throw TypeError(it + ' is not a function!');\n return it;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_a-function.js\n// module id = 34\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_a-function.js\n// module id = 34\n// module chunks = 0 1","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof')\n , TAG = require('./_wks')('toStringTag')\n // ES3 wrong here\n , ARG = cof(function(){ return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function(it, key){\n try {\n return it[key];\n } catch(e){ /* empty */ }\n};\n\nmodule.exports = function(it){\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_classof.js\n// module id = 35\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_classof.js\n// module id = 35\n// module chunks = 0 1","var toString = {}.toString;\n\nmodule.exports = function(it){\n return toString.call(it).slice(8, -1);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_cof.js\n// module id = 36\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_cof.js\n// module id = 36\n// module chunks = 0 1","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function(fn, that, length){\n aFunction(fn);\n if(that === undefined)return fn;\n switch(length){\n case 1: return function(a){\n return fn.call(that, a);\n };\n case 2: return function(a, b){\n return fn.call(that, a, b);\n };\n case 3: return function(a, b, c){\n return fn.call(that, a, b, c);\n };\n }\n return function(/* ...args */){\n return fn.apply(that, arguments);\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_ctx.js\n// module id = 37\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_ctx.js\n// module id = 37\n// module chunks = 0 1","var isObject = require('./_is-object')\n , document = require('./_global').document\n // in old IE typeof document.createElement is 'object'\n , is = isObject(document) && isObject(document.createElement);\nmodule.exports = function(it){\n return is ? document.createElement(it) : {};\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_dom-create.js\n// module id = 38\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_dom-create.js\n// module id = 38\n// module chunks = 0 1","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_enum-bug-keys.js\n// module id = 39\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_enum-bug-keys.js\n// module id = 39\n// module chunks = 0 1","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_iobject.js\n// module id = 40\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_iobject.js\n// module id = 40\n// module chunks = 0 1","'use strict';\nvar LIBRARY = require('./_library')\n , $export = require('./_export')\n , redefine = require('./_redefine')\n , hide = require('./_hide')\n , has = require('./_has')\n , Iterators = require('./_iterators')\n , $iterCreate = require('./_iter-create')\n , setToStringTag = require('./_set-to-string-tag')\n , getPrototypeOf = require('./_object-gpo')\n , ITERATOR = require('./_wks')('iterator')\n , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`\n , FF_ITERATOR = '@@iterator'\n , KEYS = 'keys'\n , VALUES = 'values';\n\nvar returnThis = function(){ return this; };\n\nmodule.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){\n $iterCreate(Constructor, NAME, next);\n var getMethod = function(kind){\n if(!BUGGY && kind in proto)return proto[kind];\n switch(kind){\n case KEYS: return function keys(){ return new Constructor(this, kind); };\n case VALUES: return function values(){ return new Constructor(this, kind); };\n } return function entries(){ return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator'\n , DEF_VALUES = DEFAULT == VALUES\n , VALUES_BUG = false\n , proto = Base.prototype\n , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]\n , $default = $native || getMethod(DEFAULT)\n , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined\n , $anyNative = NAME == 'Array' ? proto.entries || $native : $native\n , methods, key, IteratorPrototype;\n // Fix native\n if($anyNative){\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base));\n if(IteratorPrototype !== Object.prototype){\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if(DEF_VALUES && $native && $native.name !== VALUES){\n VALUES_BUG = true;\n $default = function values(){ return $native.call(this); };\n }\n // Define iterator\n if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if(DEFAULT){\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if(FORCED)for(key in methods){\n if(!(key in proto))redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_iter-define.js\n// module id = 41\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_iter-define.js\n// module id = 41\n// module chunks = 0 1","exports.f = {}.propertyIsEnumerable;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_object-pie.js\n// module id = 42\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_object-pie.js\n// module id = 42\n// module chunks = 0 1","var def = require('./_object-dp').f\n , has = require('./_has')\n , TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function(it, tag, stat){\n if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_set-to-string-tag.js\n// module id = 43\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_set-to-string-tag.js\n// module id = 43\n// module chunks = 0 1","var global = require('./_global')\n , SHARED = '__core-js_shared__'\n , store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function(key){\n return store[key] || (store[key] = {});\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_shared.js\n// module id = 44\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_shared.js\n// module id = 44\n// module chunks = 0 1","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer')\n , min = Math.min;\nmodule.exports = function(it){\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_to-length.js\n// module id = 45\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_to-length.js\n// module id = 45\n// module chunks = 0 1","var id = 0\n , px = Math.random();\nmodule.exports = function(key){\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_uid.js\n// module id = 46\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_uid.js\n// module id = 46\n// module chunks = 0 1","var classof = require('./_classof')\n , ITERATOR = require('./_wks')('iterator')\n , Iterators = require('./_iterators');\nmodule.exports = require('./_core').getIteratorMethod = function(it){\n if(it != undefined)return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/core.get-iterator-method.js\n// module id = 47\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/core.get-iterator-method.js\n// module id = 47\n// module chunks = 0 1","require('./es6.array.iterator');\nvar global = require('./_global')\n , hide = require('./_hide')\n , Iterators = require('./_iterators')\n , TO_STRING_TAG = require('./_wks')('toStringTag');\n\nfor(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){\n var NAME = collections[i]\n , Collection = global[NAME]\n , proto = Collection && Collection.prototype;\n if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = Iterators.Array;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/web.dom.iterable.js\n// module id = 48\n// module chunks = 0 1\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/web.dom.iterable.js\n// module id = 48\n// module chunks = 0 1","/**\n * @license\n * Copyright 2016 Leif Olsen. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This code is built with Google Material Design Lite,\n * which is Licensed under the Apache License, Version 2.0\n */\n\n/**\n * A WAI-ARIA friendly accordion component.\n * An accordion is a collection of expandable panels associated with a common outer container. Panels consist\n * of a header and an associated content region or tabpanel. The primary use of an Accordion is to present multiple sections\n * of content on a single page without scrolling, where all of the sections are peers in the application or object hierarchy.\n * The general look is similar to a tree where each root tree node is an expandable accordion header. The user navigates\n * and makes the contents of each panel visible (or not) by interacting with the Accordion Header\n */\n\nimport {\n VK_ENTER,\n VK_SPACE,\n VK_END,\n VK_HOME,\n VK_ARROW_LEFT,\n VK_ARROW_UP,\n VK_ARROW_RIGHT,\n VK_ARROW_DOWN,\n IS_EXPANDED,\n IS_UPGRADED,\n ARIA_MULTISELECTABLE,\n ARIA_EXPANDED,\n ARIA_HIDDEN,\n ARIA_SELECTED\n} from '../utils/constants';\n\n\n(function() {\n 'use strict';\n const ACCORDION = 'mdlext-accordion';\n const ACCORDION_VERTICAL = 'mdlext-accordion--vertical';\n const ACCORDION_HORIZONTAL = 'mdlext-accordion--horizontal';\n const PANEL = 'mdlext-accordion__panel';\n const PANEL_ROLE = 'presentation';\n const TAB = 'mdlext-accordion__tab';\n const TAB_CAPTION = 'mdlext-accordion__tab__caption';\n const TAB_ROLE = 'tab';\n const TABPANEL = 'mdlext-accordion__tabpanel';\n const TABPANEL_ROLE = 'tabpanel';\n const RIPPLE_EFFECT = 'mdlext-js-ripple-effect';\n const RIPPLE = 'mdlext-accordion__tab--ripple';\n const ANIMATION_EFFECT = 'mdlext-js-animation-effect';\n const ANIMATION = 'mdlext-accordion__tabpanel--animation';\n\n /**\n * @constructor\n * @param {Element} element The element that will be upgraded.\n */\n const MaterialExtAccordion = function MaterialExtAccordion( element ) {\n\n // Stores the Accordion HTML element.\n this.element_ = element;\n\n // Initialize instance.\n this.init();\n };\n window['MaterialExtAccordion'] = MaterialExtAccordion;\n\n\n // Helpers\n const accordionPanelElements = ( element ) => {\n if(!element) {\n return {\n panel: null,\n tab: null,\n tabpanel: null\n };\n }\n else if (element.classList.contains(PANEL)) {\n return {\n panel: element,\n tab: element.querySelector(`.${TAB}`),\n tabpanel: element.querySelector(`.${TABPANEL}`)\n };\n }\n else {\n return {\n panel: element.parentNode,\n tab: element.parentNode.querySelector(`.${TAB}`),\n tabpanel: element.parentNode.querySelector(`.${TABPANEL}`)\n };\n }\n };\n\n\n // Private methods.\n\n /**\n * Handles custom command event, 'open', 'close', 'toggle' or upgrade\n * @param event. A custom event\n * @private\n */\n MaterialExtAccordion.prototype.commandHandler_ = function( event ) {\n event.preventDefault();\n event.stopPropagation();\n\n if(event && event.detail) {\n this.command(event.detail);\n }\n };\n\n /**\n * Dispatch toggle event\n * @param {string} state\n * @param {Element} tab\n * @param {Element} tabpanel\n * @private\n */\n MaterialExtAccordion.prototype.dispatchToggleEvent_ = function ( state, tab, tabpanel ) {\n const ce = new CustomEvent('toggle', {\n bubbles: true,\n cancelable: true,\n detail: { state: state, tab: tab, tabpanel: tabpanel }\n });\n this.element_.dispatchEvent(ce);\n };\n\n /**\n * Open tab\n * @param {Element} panel\n * @param {Element} tab\n * @param {Element} tabpanel\n * @private\n */\n MaterialExtAccordion.prototype.openTab_ = function( panel, tab, tabpanel ) {\n panel.classList.add(IS_EXPANDED);\n tab.setAttribute(ARIA_EXPANDED, 'true');\n tabpanel.removeAttribute('hidden');\n tabpanel.setAttribute(ARIA_HIDDEN, 'false');\n this.dispatchToggleEvent_('open', tab, tabpanel);\n };\n\n /**\n * Close tab\n * @param {Element} panel\n * @param {Element} tab\n * @param {Element} tabpanel\n * @private\n */\n MaterialExtAccordion.prototype.closeTab_ = function( panel, tab, tabpanel ) {\n panel.classList.remove(IS_EXPANDED);\n tab.setAttribute(ARIA_EXPANDED, 'false');\n tabpanel.setAttribute('hidden', '');\n tabpanel.setAttribute(ARIA_HIDDEN, 'true');\n this.dispatchToggleEvent_('close', tab, tabpanel);\n };\n\n /**\n * Toggle tab\n * @param {Element} panel\n * @param {Element} tab\n * @param {Element} tabpanel\n * @private\n */\n MaterialExtAccordion.prototype.toggleTab_ = function( panel, tab, tabpanel ) {\n if( !(this.element_.hasAttribute('disabled') || tab.hasAttribute('disabled')) ) {\n if (tab.getAttribute(ARIA_EXPANDED).toLowerCase() === 'true') {\n this.closeTab_(panel, tab, tabpanel);\n }\n else {\n if (this.element_.getAttribute(ARIA_MULTISELECTABLE).toLowerCase() !== 'true') {\n this.closeTabs_();\n }\n this.openTab_(panel, tab, tabpanel);\n }\n }\n };\n\n /**\n * Open tabs\n * @private\n */\n MaterialExtAccordion.prototype.openTabs_ = function() {\n if (this.element_.getAttribute(ARIA_MULTISELECTABLE).toLowerCase() === 'true') {\n [...this.element_.querySelectorAll(`.${ACCORDION} > .${PANEL}`)]\n .filter(panel => !panel.classList.contains(IS_EXPANDED))\n .forEach(closedItem => {\n const tab = closedItem.querySelector(`.${TAB}`);\n if (!tab.hasAttribute('disabled')) {\n this.openTab_(closedItem, tab, closedItem.querySelector(`.${TABPANEL}`));\n }\n });\n }\n };\n\n /**\n * Close tabs\n * @private\n */\n MaterialExtAccordion.prototype.closeTabs_ = function() {\n [...this.element_.querySelectorAll(`.${ACCORDION} > .${PANEL}.${IS_EXPANDED}`)]\n .forEach( panel => {\n const tab = panel.querySelector(`.${TAB}`);\n if(!tab.hasAttribute('disabled')) {\n this.closeTab_(panel, tab, panel.querySelector(`.${TABPANEL}`));\n }\n });\n };\n\n\n // Public methods.\n\n /**\n * Upgrade an individual accordion tab\n * @public\n * @param {Element} tabElement The HTML element for the accordion panel.\n */\n MaterialExtAccordion.prototype.upgradeTab = function( tabElement ) {\n\n const { panel, tab, tabpanel } = accordionPanelElements( tabElement );\n\n const disableTab = () => {\n panel.classList.remove(IS_EXPANDED);\n tab.setAttribute('tabindex', '-1');\n tab.setAttribute(ARIA_EXPANDED, 'false');\n tabpanel.setAttribute('hidden', '');\n tabpanel.setAttribute(ARIA_HIDDEN, 'true');\n };\n\n const enableTab = () => {\n if(!tab.hasAttribute(ARIA_EXPANDED)) {\n tab.setAttribute(ARIA_EXPANDED, 'false');\n }\n\n tab.setAttribute('tabindex', '0');\n\n if(tab.getAttribute(ARIA_EXPANDED).toLowerCase() === 'true') {\n panel.classList.add(IS_EXPANDED);\n tabpanel.removeAttribute('hidden');\n tabpanel.setAttribute(ARIA_HIDDEN, 'false');\n }\n else {\n panel.classList.remove(IS_EXPANDED);\n tabpanel.setAttribute('hidden', '');\n tabpanel.setAttribute(ARIA_HIDDEN, 'true');\n }\n };\n\n // In horizontal layout, caption must have a max-width defined to prevent pushing elements to the right of the caption out of view.\n // In JsDom, offsetWidth and offsetHeight properties do not work, so this function is not testable.\n /* istanbul ignore next */\n const calcMaxTabCaptionWidth = () => {\n\n const tabCaption = tab.querySelector(`.${TAB_CAPTION}`);\n if(tabCaption !== null) {\n const w = [...tab.children]\n .filter( el => el.classList && !el.classList.contains(TAB_CAPTION) )\n .reduce( (v, el) => v + el.offsetWidth, 0 );\n\n const maxWidth = tab.clientHeight - w;\n if(maxWidth > 0) {\n tabCaption.style['max-width'] = `${maxWidth}px`;\n }\n }\n };\n\n const selectTab = () => {\n if( !tab.hasAttribute(ARIA_SELECTED) ) {\n [...this.element_.querySelectorAll(`.${TAB}[aria-selected=\"true\"]`)].forEach(\n selectedTab => selectedTab.removeAttribute(ARIA_SELECTED)\n );\n tab.setAttribute(ARIA_SELECTED, 'true');\n }\n };\n\n const tabClickHandler = () => {\n this.toggleTab_(panel, tab, tabpanel);\n selectTab();\n };\n\n const tabFocusHandler = () => {\n selectTab();\n };\n\n const tabpanelClickHandler = () => {\n selectTab();\n };\n\n const tabpanelFocusHandler = () => {\n selectTab();\n };\n\n const tabKeydownHandler = e => {\n\n if(this.element_.hasAttribute('disabled')) {\n return;\n }\n\n if ( e.keyCode === VK_END || e.keyCode === VK_HOME\n || e.keyCode === VK_ARROW_UP || e.keyCode === VK_ARROW_LEFT\n || e.keyCode === VK_ARROW_DOWN || e.keyCode === VK_ARROW_RIGHT ) {\n\n let nextTab = null;\n let keyCode = e.keyCode;\n\n if (keyCode === VK_HOME) {\n nextTab = this.element_.querySelector(`.${PANEL}:first-child > .${TAB}`);\n if(nextTab && nextTab.hasAttribute('disabled')) {\n nextTab = null;\n keyCode = VK_ARROW_DOWN;\n }\n }\n else if (keyCode === VK_END) {\n nextTab = this.element_.querySelector(`.${PANEL}:last-child > .${TAB}`);\n if(nextTab && nextTab.hasAttribute('disabled')) {\n nextTab = null;\n keyCode = VK_ARROW_UP;\n }\n }\n\n if(!nextTab) {\n let nextPanel = panel;\n\n do {\n if (keyCode === VK_ARROW_UP || keyCode === VK_ARROW_LEFT) {\n nextPanel = nextPanel.previousElementSibling;\n if(!nextPanel) {\n nextPanel = this.element_.querySelector(`.${PANEL}:last-child`);\n }\n if (nextPanel) {\n nextTab = nextPanel.querySelector(`.${PANEL} > .${TAB}`);\n }\n }\n else if (keyCode === VK_ARROW_DOWN || keyCode === VK_ARROW_RIGHT) {\n nextPanel = nextPanel.nextElementSibling;\n if(!nextPanel) {\n nextPanel = this.element_.querySelector(`.${PANEL}:first-child`);\n }\n if (nextPanel) {\n nextTab = nextPanel.querySelector(`.${PANEL} > .${TAB}`);\n }\n }\n\n if(nextTab && nextTab.hasAttribute('disabled')) {\n nextTab = null;\n }\n else {\n break;\n }\n }\n while(nextPanel !== panel);\n }\n\n if (nextTab) {\n e.preventDefault();\n e.stopPropagation();\n nextTab.focus();\n\n // Workaround for JSDom testing:\n // In JsDom 'element.focus()' does not trigger any focus event\n if(!nextTab.hasAttribute(ARIA_SELECTED)) {\n\n [...this.element_.querySelectorAll(`.${TAB}[aria-selected=\"true\"]`)]\n .forEach( selectedTab => selectedTab.removeAttribute(ARIA_SELECTED) );\n\n nextTab.setAttribute(ARIA_SELECTED, 'true');\n }\n }\n }\n else if (e.keyCode === VK_ENTER || e.keyCode === VK_SPACE) {\n e.preventDefault();\n e.stopPropagation();\n this.toggleTab_(panel, tab, tabpanel);\n }\n };\n\n if(tab === null) {\n throw new Error('There must be a tab element for each accordion panel.');\n }\n\n if(tabpanel === null) {\n throw new Error('There must be a tabpanel element for each accordion panel.');\n }\n\n panel.setAttribute('role', PANEL_ROLE);\n tab.setAttribute('role', TAB_ROLE);\n tabpanel.setAttribute('role', TABPANEL_ROLE);\n\n if(tab.hasAttribute('disabled')) {\n disableTab();\n }\n else {\n enableTab();\n }\n\n if( this.element_.classList.contains(ACCORDION_HORIZONTAL)) {\n calcMaxTabCaptionWidth();\n }\n\n if (this.element_.classList.contains(RIPPLE_EFFECT)) {\n tab.classList.add(RIPPLE);\n }\n\n if (this.element_.classList.contains(ANIMATION_EFFECT)) {\n tabpanel.classList.add(ANIMATION);\n }\n\n // Remove listeners, just in case ...\n tab.removeEventListener('click', tabClickHandler);\n tab.removeEventListener('focus', tabFocusHandler);\n tab.removeEventListener('keydown', tabKeydownHandler);\n tabpanel.removeEventListener('click', tabpanelClickHandler);\n tabpanel.removeEventListener('focus', tabpanelFocusHandler);\n\n tab.addEventListener('click', tabClickHandler);\n tab.addEventListener('focus', tabFocusHandler);\n tab.addEventListener('keydown', tabKeydownHandler);\n tabpanel.addEventListener('click', tabpanelClickHandler, true);\n tabpanel.addEventListener('focus', tabpanelFocusHandler, true);\n };\n MaterialExtAccordion.prototype['upgradeTab'] = MaterialExtAccordion.prototype.upgradeTab;\n\n\n /**\n * Execute command\n * @param detail\n */\n MaterialExtAccordion.prototype.command = function( detail ) {\n\n const openTab = tabElement => {\n\n if(tabElement === undefined) {\n this.openTabs_();\n }\n else if(tabElement !== null) {\n const { panel, tab, tabpanel } = accordionPanelElements( tabElement );\n if(tab.getAttribute(ARIA_EXPANDED).toLowerCase() !== 'true') {\n this.toggleTab_(panel, tab, tabpanel);\n }\n }\n };\n\n const closeTab = tabElement => {\n if(tabElement === undefined) {\n this.closeTabs_();\n }\n else if(tabElement !== null) {\n const { panel, tab, tabpanel } = accordionPanelElements( tabElement );\n\n if(tab.getAttribute(ARIA_EXPANDED).toLowerCase() === 'true') {\n this.toggleTab_(panel, tab, tabpanel);\n }\n }\n };\n\n const toggleTab = tabElement => {\n if(tabElement) {\n const { panel, tab, tabpanel } = accordionPanelElements( tabElement );\n this.toggleTab_(panel, tab, tabpanel);\n }\n };\n\n\n if(detail && detail.action) {\n const { action, target } = detail;\n\n switch (action.toLowerCase()) {\n case 'open':\n openTab(target);\n break;\n case 'close':\n closeTab(target);\n break;\n case 'toggle':\n toggleTab(target);\n break;\n case 'upgrade':\n if(target) {\n this.upgradeTab(target);\n }\n break;\n default:\n throw new Error(`Unknown action \"${action}\". Action must be one of \"open\", \"close\", \"toggle\" or \"upgrade\"`);\n }\n }\n };\n MaterialExtAccordion.prototype['command'] = MaterialExtAccordion.prototype.command;\n\n\n /**\n * Initialize component\n */\n MaterialExtAccordion.prototype.init = function() {\n if (this.element_) {\n // Do the init required for this component to work\n if( !(this.element_.classList.contains(ACCORDION_HORIZONTAL) || this.element_.classList.contains(ACCORDION_VERTICAL))) {\n throw new Error(`Accordion must have one of the classes \"${ACCORDION_HORIZONTAL}\" or \"${ACCORDION_VERTICAL}\"`);\n }\n\n this.element_.setAttribute('role', 'tablist');\n\n if(!this.element_.hasAttribute(ARIA_MULTISELECTABLE)) {\n this.element_.setAttribute(ARIA_MULTISELECTABLE, 'false');\n }\n\n this.element_.removeEventListener('command', this.commandHandler_);\n this.element_.addEventListener('command', this.commandHandler_.bind(this), false);\n\n [...this.element_.querySelectorAll(`.${ACCORDION} > .${PANEL}`)].forEach( panel => this.upgradeTab(panel) );\n\n // Set upgraded flag\n this.element_.classList.add(IS_UPGRADED);\n }\n };\n\n\n /*\n * Downgrade component\n * E.g remove listeners and clean up resources\n *\n * Nothing to downgrade\n *\n MaterialExtAccordion.prototype.mdlDowngrade_ = function() {\n 'use strict';\n console.log('***** MaterialExtAccordion.mdlDowngrade');\n };\n */\n\n\n // The component registers itself. It can assume componentHandler is available\n // in the global scope.\n /* eslint no-undef: 0 */\n componentHandler.register({\n constructor: MaterialExtAccordion,\n classAsString: 'MaterialExtAccordion',\n cssClass: 'mdlext-js-accordion',\n widget: true\n });\n})();\n\n\n\n// WEBPACK FOOTER //\n// ./src/accordion/accordion.js\n\n\n// WEBPACK FOOTER //\n// ./src/accordion/accordion.js","/**\n * @license\n * Copyright 2016 Leif Olsen. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This code is built with Google Material Design Lite,\n * which is Licensed under the Apache License, Version 2.0\n */\n\n/**\n * Image carousel\n */\n\nimport intervalFunction from '../utils/interval-function';\nimport { inOutQuintic } from '../utils/easing';\nimport { jsonStringToObject} from '../utils/json-utils';\nimport {\n VK_TAB,\n VK_ENTER,\n VK_ESC,\n VK_SPACE,\n VK_PAGE_UP,\n VK_PAGE_DOWN,\n VK_END,\n VK_HOME,\n VK_ARROW_LEFT,\n VK_ARROW_UP,\n VK_ARROW_RIGHT,\n VK_ARROW_DOWN,\n IS_UPGRADED,\n IS_FOCUSED,\n MDL_RIPPLE,\n MDL_RIPPLE_COMPONENT,\n MDL_RIPPLE_EFFECT,\n MDL_RIPPLE_EFFECT_IGNORE_EVENTS\n} from '../utils/constants';\n\nconst MDL_RIPPLE_CONTAINER = 'mdlext-carousel__slide__ripple-container';\n\n\n(function() {\n 'use strict';\n\n //const CAROUSEL = 'mdlext-carousel';\n const SLIDE = 'mdlext-carousel__slide';\n const ROLE = 'list';\n const SLIDE_ROLE = 'listitem';\n\n\n /**\n * @constructor\n * @param {Element} element The element that will be upgraded.\n */\n const MaterialExtCarousel = function MaterialExtCarousel(element) {\n // Stores the element.\n this.element_ = element;\n\n // Default config\n this.config_ = {\n interactive : true,\n autostart : false,\n type : 'slide',\n interval : 1000,\n animationLoop: intervalFunction(1000)\n };\n\n this.scrollAnimation_ = intervalFunction(33);\n\n // Initialize instance.\n this.init();\n };\n\n window['MaterialExtCarousel'] = MaterialExtCarousel;\n\n\n /**\n * Start slideshow animation\n * @private\n */\n MaterialExtCarousel.prototype.startSlideShow_ = function() {\n\n const nextSlide = () => {\n let slide = this.element_.querySelector(`.${SLIDE}[aria-selected]`);\n if(slide) {\n slide.removeAttribute('aria-selected');\n slide = slide.nextElementSibling;\n }\n if(!slide) {\n slide = this.element_.querySelector(`.${SLIDE}:first-child`);\n this.animateScroll_(0);\n }\n if(slide) {\n this.moveSlideIntoViewport_(slide);\n slide.setAttribute('aria-selected', '');\n this.emitSelectEvent_('next', null, slide);\n return true;\n }\n return false;\n };\n\n const nextScroll = direction => {\n let nextDirection = direction;\n\n if('next' === direction && this.element_.scrollLeft === this.element_.scrollWidth - this.element_.clientWidth) {\n nextDirection = 'prev';\n }\n else if(this.element_.scrollLeft === 0) {\n nextDirection = 'next';\n }\n const x = 'next' === nextDirection\n ? Math.min(this.element_.scrollLeft + this.element_.clientWidth, this.element_.scrollWidth - this.element_.clientWidth)\n : Math.max(this.element_.scrollLeft - this.element_.clientWidth, 0);\n\n this.animateScroll_(x, 1000);\n return nextDirection;\n };\n\n\n if(!this.config_.animationLoop.started) {\n this.config_.animationLoop.interval = this.config_.interval;\n let direction = 'next';\n\n if('scroll' === this.config_.type) {\n this.config_.animationLoop.start( () => {\n direction = nextScroll(direction);\n return true; // It runs until cancelSlideShow_ is triggered\n });\n }\n else {\n nextSlide();\n this.config_.animationLoop.start( () => {\n return nextSlide(); // It runs until cancelSlideShow_ is triggered\n });\n }\n }\n\n // TODO: Pause animation when carousel is not in browser viewport or user changes tab\n };\n\n /**\n * Cancel slideshow if running. Emmits a 'pause' event\n * @private\n */\n MaterialExtCarousel.prototype.cancelSlideShow_ = function() {\n if(this.config_.animationLoop.started) {\n this.config_.animationLoop.stop();\n this.emitSelectEvent_('pause', VK_ESC, this.element_.querySelector(`.${SLIDE}[aria-selected]`));\n }\n };\n\n /**\n * Animate scroll\n * @param newPosition\n * @param newDuration\n * @param completedCallback\n * @private\n */\n MaterialExtCarousel.prototype.animateScroll_ = function( newPosition, newDuration, completedCallback ) {\n\n const start = this.element_.scrollLeft;\n const distance = newPosition - start;\n\n if(distance !== 0) {\n const duration = Math.max(Math.min(Math.abs(distance), newDuration||400), 100); // duration is between 100 and newDuration||400ms||distance\n let t = 0;\n this.scrollAnimation_.stop();\n this.scrollAnimation_.start( timeElapsed => {\n t += timeElapsed;\n if(t < duration) {\n this.element_.scrollLeft = inOutQuintic(t, start, distance, duration);\n return true;\n }\n else {\n this.element_.scrollLeft = newPosition;\n if(completedCallback) {\n completedCallback();\n }\n return false;\n }\n });\n }\n else {\n if(completedCallback) {\n completedCallback();\n }\n }\n };\n\n /**\n * Execute commend\n * @param event\n * @private\n */\n MaterialExtCarousel.prototype.command_ = function( event ) {\n let x = 0;\n let slide = null;\n const a = event.detail.action.toLowerCase();\n\n // Cancel slideshow if running\n this.cancelSlideShow_();\n\n switch (a) {\n case 'first':\n slide = this.element_.querySelector(`.${SLIDE}:first-child`);\n break;\n\n case 'last':\n x = this.element_.scrollWidth - this.element_.clientWidth;\n slide = this.element_.querySelector(`.${SLIDE}:last-child`);\n break;\n\n case 'scroll-prev':\n x = Math.max(this.element_.scrollLeft - this.element_.clientWidth, 0);\n break;\n\n case 'scroll-next':\n x = Math.min(this.element_.scrollLeft + this.element_.clientWidth, this.element_.scrollWidth - this.element_.clientWidth);\n break;\n\n case 'next':\n case 'prev':\n slide = this.element_.querySelector(`.${SLIDE}[aria-selected]`);\n if(slide) {\n slide = a === 'next' ? slide.nextElementSibling : slide.previousElementSibling;\n this.setAriaSelected_(slide);\n this.emitSelectEvent_(a, null, slide);\n }\n return;\n\n case 'play':\n Object.assign(this.config_, event.detail);\n this.startSlideShow_();\n return;\n\n case 'pause':\n return;\n\n default:\n return;\n }\n\n this.animateScroll_(x, undefined, () => {\n if ('scroll-next' === a || 'scroll-prev' === a) {\n const slides = this.getSlidesInViewport_();\n if (slides.length > 0) {\n slide = 'scroll-next' === a ? slides[0] : slides[slides.length - 1];\n }\n }\n this.setAriaSelected_(slide);\n this.emitSelectEvent_(a, null, slide);\n });\n };\n\n /**\n * Handles custom command event, 'scroll-prev', 'scroll-next', 'first', 'last', next, prev, play, pause\n * @param event. A custom event\n * @private\n */\n MaterialExtCarousel.prototype.commandHandler_ = function( event ) {\n event.preventDefault();\n event.stopPropagation();\n if(event.detail && event.detail.action) {\n this.command_(event);\n }\n };\n\n /**\n * Handle keypress\n * @param event\n * @private\n */\n MaterialExtCarousel.prototype.keyDownHandler_ = function(event) {\n\n if (event && event.target && event.target !== this.element_) {\n\n let action = 'first';\n\n if ( event.keyCode === VK_HOME || event.keyCode === VK_END\n || event.keyCode === VK_PAGE_UP || event.keyCode === VK_PAGE_DOWN) {\n\n event.preventDefault();\n if (event.keyCode === VK_END) {\n action = 'last';\n }\n else if (event.keyCode === VK_PAGE_UP) {\n action = 'scroll-prev';\n }\n else if (event.keyCode === VK_PAGE_DOWN) {\n action = 'scroll-next';\n }\n this.command_(action);\n }\n else if ( event.keyCode === VK_TAB\n || event.keyCode === VK_ENTER || event.keyCode === VK_SPACE\n || event.keyCode === VK_ARROW_UP || event.keyCode === VK_ARROW_LEFT\n || event.keyCode === VK_ARROW_DOWN || event.keyCode === VK_ARROW_RIGHT) {\n\n let slide = getSlide_(event.target);\n\n if(!slide) {\n return;\n }\n\n // Cancel slideshow if running\n this.cancelSlideShow_();\n\n switch (event.keyCode) {\n case VK_ARROW_UP:\n case VK_ARROW_LEFT:\n action = 'prev';\n slide = slide.previousElementSibling;\n break;\n\n case VK_ARROW_DOWN:\n case VK_ARROW_RIGHT:\n action = 'next';\n slide = slide.nextElementSibling;\n break;\n\n case VK_TAB:\n if (event.shiftKey) {\n action = 'prev';\n slide = slide.previousElementSibling;\n }\n else {\n action = 'next';\n slide = slide.nextElementSibling;\n }\n break;\n\n case VK_SPACE:\n case VK_ENTER:\n action = 'select';\n break;\n }\n\n if(slide) {\n event.preventDefault();\n setFocus_(slide);\n this.emitSelectEvent_(action, event.keyCode, slide);\n }\n }\n }\n };\n\n /**\n * Handle dragging\n * @param event\n * @private\n */\n MaterialExtCarousel.prototype.dragHandler_ = function(event) {\n event.preventDefault();\n\n // Cancel slideshow if running\n this.cancelSlideShow_();\n\n let updating = false;\n let rAFDragId = 0;\n\n const startX = event.clientX || (event.touches !== undefined ? event.touches[0].clientX : 0);\n let prevX = startX;\n const targetElement = event.target;\n\n const update = e => {\n const currentX = (e.clientX || (e.touches !== undefined ? e.touches[0].clientX : 0));\n const dx = prevX - currentX;\n\n if(dx < 0) {\n this.element_.scrollLeft = Math.max(this.element_.scrollLeft + dx, 0);\n }\n else if(dx > 0) {\n this.element_.scrollLeft = Math.min(this.element_.scrollLeft + dx, this.element_.scrollWidth - this.element_.clientWidth);\n }\n\n prevX = currentX;\n updating = false;\n };\n\n // drag handler\n const drag = e => {\n e.preventDefault();\n\n if(!updating) {\n rAFDragId = window.requestAnimationFrame( () => update(e));\n updating = true;\n }\n };\n\n // end drag handler\n const endDrag = e => {\n e.preventDefault();\n\n this.element_.removeEventListener('mousemove', drag);\n this.element_.removeEventListener('touchmove', drag);\n window.removeEventListener('mouseup', endDrag);\n window.removeEventListener('touchend', endDrag);\n\n // cancel any existing drag rAF, see: http://www.html5rocks.com/en/tutorials/speed/animations/\n window.cancelAnimationFrame(rAFDragId);\n\n const slide = getSlide_(targetElement);\n setFocus_(slide);\n this.emitSelectEvent_('click', null, slide);\n };\n\n this.element_.addEventListener('mousemove', drag);\n this.element_.addEventListener('touchmove', drag);\n window.addEventListener('mouseup', endDrag);\n window.addEventListener('touchend',endDrag);\n };\n\n /**\n * Handle click\n * @param event\n * @private\n */\n MaterialExtCarousel.prototype.clickHandler_ = function(event) {\n // Click is handled by drag\n event.preventDefault();\n };\n\n /**\n * Handle focus\n * @param event\n * @private\n */\n MaterialExtCarousel.prototype.focusHandler_ = function(event) {\n const slide = getSlide_(event.target);\n if(slide) {\n // The last focused/selected slide has 'aria-selected', even if focus is lost\n this.setAriaSelected_(slide);\n slide.classList.add(IS_FOCUSED);\n }\n };\n\n /**\n * Handle blur\n * @param event\n * @private\n */\n MaterialExtCarousel.prototype.blurHandler_ = function(event) {\n const slide = getSlide_(event.target);\n if(slide) {\n slide.classList.remove(IS_FOCUSED);\n }\n };\n\n /**\n * Emits a custeom 'select' event\n * @param command\n * @param keyCode\n * @param slide\n * @private\n */\n MaterialExtCarousel.prototype.emitSelectEvent_ = function(command, keyCode, slide) {\n\n if(slide) {\n this.moveSlideIntoViewport_(slide);\n\n const evt = new CustomEvent('select', {\n bubbles: true,\n cancelable: true,\n detail: {\n command: command,\n keyCode: keyCode,\n source: slide\n }\n });\n this.element_.dispatchEvent(evt);\n }\n };\n\n /**\n * Get the first visible slide in component viewport\n * @private\n */\n MaterialExtCarousel.prototype.getSlidesInViewport_ = function() {\n const carouselRect = this.element_.getBoundingClientRect();\n\n const slidesInViewport = [...this.element_.querySelectorAll(`.${SLIDE}`)].filter( slide => {\n const slideRect = slide.getBoundingClientRect();\n return slideRect.left >= carouselRect.left && slideRect.right <= carouselRect.right;\n });\n return slidesInViewport;\n };\n\n /**\n * Move slide into component viewport - if needed\n * @param slide\n * @private\n */\n MaterialExtCarousel.prototype.moveSlideIntoViewport_ = function(slide) {\n const carouselRect = this.element_.getBoundingClientRect();\n const slideRect = slide.getBoundingClientRect();\n\n if(slideRect.left < carouselRect.left) {\n const x = this.element_.scrollLeft - (carouselRect.left - slideRect.left);\n this.animateScroll_(x);\n }\n else if(slideRect.right > carouselRect.right) {\n const x = this.element_.scrollLeft - (carouselRect.right - slideRect.right);\n this.animateScroll_(x);\n }\n };\n\n\n /**\n * Removes 'aria-selected' from all slides in carousel\n * @private\n */\n MaterialExtCarousel.prototype.setAriaSelected_ = function(slide) {\n if(slide) {\n [...this.element_.querySelectorAll(`.${SLIDE}[aria-selected]`)].forEach(\n slide => slide.removeAttribute('aria-selected')\n );\n slide.setAttribute('aria-selected', '');\n }\n };\n\n /**\n * Removes event listeners\n * @private\n */\n MaterialExtCarousel.prototype.removeListeners_ = function() {\n this.element_.removeEventListener('focus', this.focusHandler_);\n this.element_.removeEventListener('blur', this.blurHandler_);\n this.element_.removeEventListener('keydown', this.keyDownHandler_);\n this.element_.removeEventListener('mousedown', this.dragHandler_);\n this.element_.removeEventListener('touchstart', this.dragHandler_);\n this.element_.removeEventListener('click', this.clickHandler_, false);\n this.element_.removeEventListener('command', this.commandHandler_);\n this.element_.removeEventListener('mdl-componentdowngraded', this.mdlDowngrade_);\n };\n\n\n // Helpers\n const getSlide_ = element => {\n return element.closest(`.${SLIDE}`);\n };\n\n const setFocus_ = slide => {\n if(slide) {\n slide.focus();\n }\n };\n\n const addRipple_ = slide => {\n if(!slide.querySelector(`.${MDL_RIPPLE_CONTAINER}`)) {\n const rippleContainer = document.createElement('span');\n rippleContainer.classList.add(MDL_RIPPLE_CONTAINER);\n rippleContainer.classList.add(MDL_RIPPLE_EFFECT);\n const ripple = document.createElement('span');\n ripple.classList.add(MDL_RIPPLE);\n rippleContainer.appendChild(ripple);\n\n const img = slide.querySelector('img');\n if (img) {\n // rippleContainer blocks image title\n rippleContainer.title = img.title;\n }\n slide.appendChild(rippleContainer);\n componentHandler.upgradeElement(rippleContainer, MDL_RIPPLE_COMPONENT);\n }\n };\n // End helpers\n\n\n // Public methods.\n\n /**\n * Cancel animation - if running.\n *\n * @public\n */\n MaterialExtCarousel.prototype.stopAnimation = function() {\n this.config_.animationLoop.stop();\n };\n MaterialExtCarousel.prototype['stopAnimation'] = MaterialExtCarousel.prototype.stopAnimation;\n\n\n /**\n * Upgrade slides\n * Use if more list elements are added later (dynamically)\n *\n * @public\n */\n MaterialExtCarousel.prototype.upgradeSlides = function() {\n\n const hasRippleEffect = this.element_.classList.contains(MDL_RIPPLE_EFFECT);\n\n [...this.element_.querySelectorAll(`.${SLIDE}`)].forEach( slide => {\n\n slide.setAttribute('role', SLIDE_ROLE);\n\n if(this.config_.interactive) {\n if(!slide.getAttribute('tabindex')) {\n slide.setAttribute('tabindex', '0');\n }\n if (hasRippleEffect) {\n addRipple_(slide);\n }\n }\n else {\n slide.setAttribute('tabindex', '-1');\n }\n });\n };\n MaterialExtCarousel.prototype['upgradeSlides'] = MaterialExtCarousel.prototype.upgradeSlides;\n\n\n /**\n * Get config object\n *\n * @public\n */\n MaterialExtCarousel.prototype.getConfig = function() {\n return this.config_;\n };\n MaterialExtCarousel.prototype['getConfig'] = MaterialExtCarousel.prototype.getConfig;\n\n /**\n * Initialize component\n */\n MaterialExtCarousel.prototype.init = function() {\n\n if (this.element_) {\n // Config\n if(this.element_.hasAttribute('data-config')) {\n this.config_ = jsonStringToObject(this.element_.getAttribute('data-config'), this.config_);\n }\n\n // Wai-Aria\n this.element_.setAttribute('role', ROLE);\n\n // Prefer tabindex -1\n if(!Number.isInteger(this.element_.getAttribute('tabindex'))) {\n this.element_.setAttribute('tabindex', -1);\n }\n\n // Remove listeners, just in case ...\n this.removeListeners_();\n\n if(this.config_.interactive) {\n\n // Ripple\n const hasRippleEffect = this.element_.classList.contains(MDL_RIPPLE_EFFECT);\n if (hasRippleEffect) {\n this.element_.classList.add(MDL_RIPPLE_EFFECT_IGNORE_EVENTS);\n }\n\n // Listen to focus/blur events\n this.element_.addEventListener('focus', this.focusHandler_.bind(this), true);\n this.element_.addEventListener('blur', this.blurHandler_.bind(this), true);\n\n // Listen to keyboard events\n this.element_.addEventListener('keydown', this.keyDownHandler_.bind(this), false);\n\n // Listen to drag events\n this.element_.addEventListener('mousedown', this.dragHandler_.bind(this), false);\n this.element_.addEventListener('touchstart', this.dragHandler_.bind(this), false);\n\n // Listen to click events\n this.element_.addEventListener('click', this.clickHandler_.bind(this), false);\n }\n\n // Listen to custom 'command' event\n this.element_.addEventListener('command', this.commandHandler_.bind(this), false);\n\n // Listen to 'mdl-componentdowngraded' event\n this.element_.addEventListener('mdl-componentdowngraded', this.mdlDowngrade_.bind(this));\n\n // Slides collection\n this.upgradeSlides();\n\n // Set upgraded flag\n this.element_.classList.add(IS_UPGRADED);\n\n if(this.config_.autostart) {\n // Start slideshow\n this.startSlideShow_();\n }\n }\n };\n\n /*\n * Downgrade component\n * E.g remove listeners and clean up resources\n */\n MaterialExtCarousel.prototype.mdlDowngrade_ = function() {\n 'use strict';\n //console.log('***** MaterialExtCarousel.mdlDowngrade_');\n\n // Stop animation - if any\n this.stopAnimation();\n\n // Remove listeners\n this.removeListeners_();\n };\n\n // The component registers itself. It can assume componentHandler is available\n // in the global scope.\n /* eslint no-undef: 0 */\n componentHandler.register({\n constructor: MaterialExtCarousel,\n classAsString: 'MaterialExtCarousel',\n cssClass: 'mdlext-js-carousel',\n widget: true\n });\n})();\n\n\n\n// WEBPACK FOOTER //\n// ./src/carousel/carousel.js\n\n\n// WEBPACK FOOTER //\n// ./src/carousel/carousel.js","/**\n * @license\n * Copyright 2016-2017 Leif Olsen. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This code is built with Google Material Design Lite,\n * which is Licensed under the Apache License, Version 2.0\n */\n\n\n/**\n * A collapsible is a component to mark expandable and collapsible regions.\n * The component use the aria-expanded state to indicate whether regions of\n * the content are collapsible, and to expose whether a region is currently\n * expanded or collapsed.\n * @see https://www.w3.org/WAI/GL/wiki/Using_the_WAI-ARIA_aria-expanded_state_to_mark_expandable_and_collapsible_regions\n */\n\nimport {\n IS_UPGRADED,\n VK_SPACE,\n VK_ENTER,\n} from '../utils/constants';\n\nimport { randomString } from '../utils/string-utils';\nimport { getParentElements, isFocusable } from '../utils/dom-utils';\n\nconst JS_COLLAPSIBLE = 'mdlext-js-collapsible';\nconst COLLAPSIBLE_CONTROL_CLASS = 'mdlext-collapsible';\nconst COLLAPSIBLE_REGION_CLASS = 'mdlext-collapsible-region';\n\n/**\n * The collapsible component\n */\n\nclass Collapsible {\n element_ = null;\n controlElement_ = null;\n\n /**\n * @constructor\n * @param {HTMLElement} element The element that this component is connected to.\n */\n constructor(element) {\n this.element_ = element;\n this.init();\n }\n\n keyDownHandler = event => {\n if (event.keyCode === VK_ENTER || event.keyCode === VK_SPACE) {\n event.preventDefault();\n\n // Trigger click\n (event.target || this.controlElement).dispatchEvent(\n new MouseEvent('click', {\n bubbles: true,\n cancelable: true,\n view: window\n })\n );\n }\n };\n\n clickHandler = event => {\n if(!this.isDisabled) {\n if(event.target !== this.controlElement) {\n // Do not toggle if a focusable element inside the control element triggered the event\n const p = getParentElements(event.target, this.controlElement);\n p.push(event.target);\n if(p.find( el => isFocusable(el))) {\n return;\n }\n }\n this.toggle();\n }\n };\n\n get element() {\n return this.element_;\n }\n\n get controlElement() {\n return this.controlElement_;\n }\n\n get isDisabled() {\n return (this.controlElement.hasAttribute('disabled') &&\n this.controlElement.getAttribute('disabled').toLowerCase() !== 'false') ||\n (this.controlElement.hasAttribute('aria-disabled') &&\n this.controlElement.getAttribute('aria-disabled').toLowerCase() !== 'false');\n }\n\n get isExpanded() {\n return this.controlElement.hasAttribute('aria-expanded') &&\n this.controlElement.getAttribute('aria-expanded').toLowerCase() === 'true';\n }\n\n get regionIds() {\n return this.controlElement.hasAttribute('aria-controls')\n ? this.controlElement.getAttribute('aria-controls').split(' ')\n : [];\n }\n\n get regionElements() {\n return this.regionIds\n .map(id => document.querySelector(`#${id}`))\n .filter( el => el != null);\n }\n\n collapse() {\n if(!this.isDisabled && this.isExpanded) {\n if(this.dispatchToggleEvent('collapse')) {\n this.controlElement.setAttribute('aria-expanded', 'false');\n const regions = this.regionElements.slice(0);\n for (let i = regions.length - 1; i >= 0; --i) {\n regions[i].setAttribute('hidden', '');\n }\n }\n }\n }\n\n expand() {\n if(!this.isDisabled && !this.isExpanded) {\n if(this.dispatchToggleEvent('expand')) {\n this.controlElement.setAttribute('aria-expanded', 'true');\n this.regionElements.forEach(region => region.removeAttribute('hidden'));\n }\n }\n }\n\n toggle() {\n if (this.isExpanded) {\n this.collapse();\n }\n else {\n this.expand();\n }\n }\n\n dispatchToggleEvent(action) {\n return this.element.dispatchEvent(\n new CustomEvent('toggle', {\n bubbles: true,\n cancelable: true,\n detail: {\n action: action\n }\n })\n );\n }\n\n disableToggle() {\n this.controlElement.setAttribute('aria-disabled', true);\n }\n\n enableToggle() {\n this.controlElement.removeAttribute('aria-disabled');\n }\n\n addRegionId(regionId) {\n const ids = this.regionIds;\n if(!ids.find(id => regionId === id)) {\n ids.push(regionId);\n this.controlElement.setAttribute('aria-controls', ids.join(' '));\n }\n }\n\n addRegionElement(region) {\n if(!region.hasAttribute('id')) {\n region.id = `region-${randomString()}`;\n }\n region.classList.add(COLLAPSIBLE_REGION_CLASS);\n\n if(!region.hasAttribute('role')) {\n region.setAttribute('role', 'region');\n }\n\n if(this.isExpanded) {\n region.removeAttribute('hidden');\n }\n else {\n region.setAttribute('hidden', '');\n }\n this.addRegionId(region.id);\n }\n\n removeRegionElement(region) {\n if(region && region.id) {\n const ids = this.regionIds.filter(id => id === region.id);\n this.controlElement.setAttribute('aria-controls', ids.join(' '));\n }\n }\n\n removeListeners() {\n this.controlElement.removeEventListener('keydown', this.keyDownHandler);\n this.controlElement.removeEventListener('click', this.clickHandler);\n }\n\n init() {\n const initControl = () => {\n // Find the button element\n this.controlElement_ = this.element.querySelector(`.${COLLAPSIBLE_CONTROL_CLASS}`) || this.element;\n\n // Add \"aria-expanded\" attribute if not present\n if(!this.controlElement.hasAttribute('aria-expanded')) {\n this.controlElement.setAttribute('aria-expanded', 'false');\n }\n\n // Add role=button if control !=