@limetech/lime-elements
Version:
419 lines • 68.2 kB
JavaScript
import{r as t,c as r,h as e,g as n}from"./p-288f0842.js";import{g as i,a as o}from"./p-d251f404.js";import{i as a}from"./p-0cc45207.js";import{_ as c,a as s,g as l,M as u,b as d,m as f,c as h}from"./p-9f722992.js";import{a as m,b,M as p}from"./p-5a478c15.js";import{S as v,c as g}from"./p-394c3702.js";import{a as _,b as y,c as w,i as x,d as C}from"./p-5ef5ecdd.js";import{a as T}from"./p-669626e5.js";import{e as k}from"./p-6f46165b.js";import"./p-4f8562ee.js";import"./p-9bdd72e2.js";import"./p-23071d2f.js";import"./p-c93050d6.js";import"./p-0b1af919.js";import"./p-87a34aa6.js";import"./p-504ee819.js";import"./p-858c6b82.js";import"./p-88b3ee98.js";var S=200;function A(t,r,e,n){var i=-1,o=_,a=true,c=t.length,s=[],l=r.length;if(!c){return s}if(e){r=T(r,k(e))}if(n){o=y;a=false}else if(r.length>=S){o=g;a=false;r=new v(r)}t:while(++i<c){var u=t[i],d=e==null?u:e(u);u=n||u!==0?u:0;if(a&&d===d){var f=l;while(f--){if(r[f]===d){continue t}}s.push(u)}else if(!o(r,d,n)){s.push(u)}}return s}var E=w((function(t,r){return x(t)?A(t,C(r,1,x,true)):[]}));
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var O={ANIMATING:"mdc-tab-scroller--animating",SCROLL_AREA_SCROLL:"mdc-tab-scroller__scroll-area--scroll",SCROLL_TEST:"mdc-tab-scroller__test"};var R={AREA_SELECTOR:".mdc-tab-scroller__scroll-area",CONTENT_SELECTOR:".mdc-tab-scroller__scroll-content"};
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var j=function(){function t(t){this.adapter=t}return t}();
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var I=function(t){c(r,t);function r(){return t!==null&&t.apply(this,arguments)||this}r.prototype.getScrollPositionRTL=function(){var t=this.adapter.getScrollAreaScrollLeft();var r=this.calculateScrollEdges().right;return Math.round(r-t)};r.prototype.scrollToRTL=function(t){var r=this.calculateScrollEdges();var e=this.adapter.getScrollAreaScrollLeft();var n=this.clampScrollValue(r.right-t);return{finalScrollPosition:n,scrollDelta:n-e}};r.prototype.incrementScrollRTL=function(t){var r=this.adapter.getScrollAreaScrollLeft();var e=this.clampScrollValue(r-t);return{finalScrollPosition:e,scrollDelta:e-r}};r.prototype.getAnimatingScrollPosition=function(t){return t};r.prototype.calculateScrollEdges=function(){var t=this.adapter.getScrollContentOffsetWidth();var r=this.adapter.getScrollAreaOffsetWidth();return{left:0,right:t-r}};r.prototype.clampScrollValue=function(t){var r=this.calculateScrollEdges();return Math.min(Math.max(r.left,t),r.right)};return r}(j);
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var L=function(t){c(r,t);function r(){return t!==null&&t.apply(this,arguments)||this}r.prototype.getScrollPositionRTL=function(t){var r=this.adapter.getScrollAreaScrollLeft();return Math.round(t-r)};r.prototype.scrollToRTL=function(t){var r=this.adapter.getScrollAreaScrollLeft();var e=this.clampScrollValue(-t);return{finalScrollPosition:e,scrollDelta:e-r}};r.prototype.incrementScrollRTL=function(t){var r=this.adapter.getScrollAreaScrollLeft();var e=this.clampScrollValue(r-t);return{finalScrollPosition:e,scrollDelta:e-r}};r.prototype.getAnimatingScrollPosition=function(t,r){return t-r};r.prototype.calculateScrollEdges=function(){var t=this.adapter.getScrollContentOffsetWidth();var r=this.adapter.getScrollAreaOffsetWidth();return{left:r-t,right:0}};r.prototype.clampScrollValue=function(t){var r=this.calculateScrollEdges();return Math.max(Math.min(r.right,t),r.left)};return r}(j);
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var z=function(t){c(r,t);function r(){return t!==null&&t.apply(this,arguments)||this}r.prototype.getScrollPositionRTL=function(t){var r=this.adapter.getScrollAreaScrollLeft();return Math.round(r-t)};r.prototype.scrollToRTL=function(t){var r=this.adapter.getScrollAreaScrollLeft();var e=this.clampScrollValue(t);return{finalScrollPosition:e,scrollDelta:r-e}};r.prototype.incrementScrollRTL=function(t){var r=this.adapter.getScrollAreaScrollLeft();var e=this.clampScrollValue(r+t);return{finalScrollPosition:e,scrollDelta:r-e}};r.prototype.getAnimatingScrollPosition=function(t,r){return t+r};r.prototype.calculateScrollEdges=function(){var t=this.adapter.getScrollContentOffsetWidth();var r=this.adapter.getScrollAreaOffsetWidth();return{left:t-r,right:0}};r.prototype.clampScrollValue=function(t){var r=this.calculateScrollEdges();return Math.min(Math.max(r.right,t),r.left)};return r}(j);
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var D=function(t){c(r,t);function r(e){var n=t.call(this,s(s({},r.defaultAdapter),e))||this;n.isAnimating=false;return n}Object.defineProperty(r,"cssClasses",{get:function(){return O},enumerable:false,configurable:true});Object.defineProperty(r,"strings",{get:function(){return R},enumerable:false,configurable:true});Object.defineProperty(r,"defaultAdapter",{get:function(){return{eventTargetMatchesSelector:function(){return false},addClass:function(){return undefined},removeClass:function(){return undefined},addScrollAreaClass:function(){return undefined},setScrollAreaStyleProperty:function(){return undefined},setScrollContentStyleProperty:function(){return undefined},getScrollContentStyleValue:function(){return""},setScrollAreaScrollLeft:function(){return undefined},getScrollAreaScrollLeft:function(){return 0},getScrollContentOffsetWidth:function(){return 0},getScrollAreaOffsetWidth:function(){return 0},computeScrollAreaClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},computeScrollContentClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},computeHorizontalScrollbarHeight:function(){return 0}}},enumerable:false,configurable:true});r.prototype.init=function(){var t=this.adapter.computeHorizontalScrollbarHeight();this.adapter.setScrollAreaStyleProperty("margin-bottom",-t+"px");this.adapter.addScrollAreaClass(r.cssClasses.SCROLL_AREA_SCROLL)};r.prototype.getScrollPosition=function(){if(this.isRTL()){return this.computeCurrentScrollPositionRTL()}var t=this.calculateCurrentTranslateX();var r=this.adapter.getScrollAreaScrollLeft();return r-t};r.prototype.handleInteraction=function(){if(!this.isAnimating){return}this.stopScrollAnimation()};r.prototype.handleTransitionEnd=function(t){var e=t.target;if(!this.isAnimating||!this.adapter.eventTargetMatchesSelector(e,r.strings.CONTENT_SELECTOR)){return}this.isAnimating=false;this.adapter.removeClass(r.cssClasses.ANIMATING)};r.prototype.incrementScroll=function(t){if(t===0){return}this.animate(this.getIncrementScrollOperation(t))};r.prototype.incrementScrollImmediate=function(t){if(t===0){return}var r=this.getIncrementScrollOperation(t);if(r.scrollDelta===0){return}this.stopScrollAnimation();this.adapter.setScrollAreaScrollLeft(r.finalScrollPosition)};r.prototype.scrollTo=function(t){if(this.isRTL()){this.scrollToImplRTL(t);return}this.scrollToImpl(t)};r.prototype.getRTLScroller=function(){if(!this.rtlScrollerInstance){this.rtlScrollerInstance=this.rtlScrollerFactory()}return this.rtlScrollerInstance};r.prototype.calculateCurrentTranslateX=function(){var t=this.adapter.getScrollContentStyleValue("transform");if(t==="none"){return 0}var r=/\((.+?)\)/.exec(t);if(!r){return 0}var e=r[1];var n=l(e.split(","),6),i=n[4];return parseFloat(i)};r.prototype.clampScrollValue=function(t){var r=this.calculateScrollEdges();return Math.min(Math.max(r.left,t),r.right)};r.prototype.computeCurrentScrollPositionRTL=function(){var t=this.calculateCurrentTranslateX();return this.getRTLScroller().getScrollPositionRTL(t)};r.prototype.calculateScrollEdges=function(){var t=this.adapter.getScrollContentOffsetWidth();var r=this.adapter.getScrollAreaOffsetWidth();return{left:0,right:t-r}};r.prototype.scrollToImpl=function(t){var r=this.getScrollPosition();var e=this.clampScrollValue(t);var n=e-r;this.animate({finalScrollPosition:e,scrollDelta:n})};r.prototype.scrollToImplRTL=function(t){var r=this.getRTLScroller().scrollToRTL(t);this.animate(r)};r.prototype.getIncrementScrollOperation=function(t){if(this.isRTL()){return this.getRTLScroller().incrementScrollRTL(t)}var r=this.getScrollPosition();var e=t+r;var n=this.clampScrollValue(e);var i=n-r;return{finalScrollPosition:n,scrollDelta:i}};r.prototype.animate=function(t){var e=this;if(t.scrollDelta===0){return}this.stopScrollAnimation();this.adapter.setScrollAreaScrollLeft(t.finalScrollPosition);this.adapter.setScrollContentStyleProperty("transform","translateX("+t.scrollDelta+"px)");this.adapter.computeScrollAreaClientRect();requestAnimationFrame((function(){e.adapter.addClass(r.cssClasses.ANIMATING);e.adapter.setScrollContentStyleProperty("transform","none")}));this.isAnimating=true};r.prototype.stopScrollAnimation=function(){this.isAnimating=false;var t=this.getAnimatingScrollPosition();this.adapter.removeClass(r.cssClasses.ANIMATING);this.adapter.setScrollContentStyleProperty("transform","translateX(0px)");this.adapter.setScrollAreaScrollLeft(t)};r.prototype.getAnimatingScrollPosition=function(){var t=this.calculateCurrentTranslateX();var r=this.adapter.getScrollAreaScrollLeft();if(this.isRTL()){return this.getRTLScroller().getAnimatingScrollPosition(r,t)}return r-t};r.prototype.rtlScrollerFactory=function(){var t=this.adapter.getScrollAreaScrollLeft();this.adapter.setScrollAreaScrollLeft(t-1);var r=this.adapter.getScrollAreaScrollLeft();if(r<0){this.adapter.setScrollAreaScrollLeft(t);return new L(this.adapter)}var e=this.adapter.computeScrollAreaClientRect();var n=this.adapter.computeScrollContentClientRect();var i=Math.round(n.right-e.right);this.adapter.setScrollAreaScrollLeft(t);if(i===r){return new z(this.adapter)}return new I(this.adapter)};r.prototype.isRTL=function(){return this.adapter.getScrollContentStyleValue("direction")==="rtl"};return r}(u);
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var M;function N(t,r){if(r===void 0){r=true}if(r&&typeof M!=="undefined"){return M}var e=t.createElement("div");e.classList.add(O.SCROLL_TEST);t.body.appendChild(e);var n=e.offsetHeight-e.clientHeight;t.body.removeChild(e);if(r){M=n}return n}
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var P=function(t){c(r,t);function r(){return t!==null&&t.apply(this,arguments)||this}r.attachTo=function(t){return new r(t)};r.prototype.initialize=function(){this.area=this.root.querySelector(D.strings.AREA_SELECTOR);this.content=this.root.querySelector(D.strings.CONTENT_SELECTOR)};r.prototype.initialSyncWithDOM=function(){var t=this;this.handleInteraction=function(){t.foundation.handleInteraction()};this.handleTransitionEnd=function(r){t.foundation.handleTransitionEnd(r)};this.area.addEventListener("wheel",this.handleInteraction,m());this.area.addEventListener("touchstart",this.handleInteraction,m());this.area.addEventListener("pointerdown",this.handleInteraction,m());this.area.addEventListener("mousedown",this.handleInteraction,m());this.area.addEventListener("keydown",this.handleInteraction,m());this.content.addEventListener("transitionend",this.handleTransitionEnd)};r.prototype.destroy=function(){t.prototype.destroy.call(this);this.area.removeEventListener("wheel",this.handleInteraction,m());this.area.removeEventListener("touchstart",this.handleInteraction,m());this.area.removeEventListener("pointerdown",this.handleInteraction,m());this.area.removeEventListener("mousedown",this.handleInteraction,m());this.area.removeEventListener("keydown",this.handleInteraction,m());this.content.removeEventListener("transitionend",this.handleTransitionEnd)};r.prototype.getDefaultFoundation=function(){var t=this;var r={eventTargetMatchesSelector:function(t,r){return f(t,r)},addClass:function(r){t.root.classList.add(r)},removeClass:function(r){t.root.classList.remove(r)},addScrollAreaClass:function(r){t.area.classList.add(r)},setScrollAreaStyleProperty:function(r,e){t.area.style.setProperty(r,e)},setScrollContentStyleProperty:function(r,e){t.content.style.setProperty(r,e)},getScrollContentStyleValue:function(r){return window.getComputedStyle(t.content).getPropertyValue(r)},setScrollAreaScrollLeft:function(r){return t.area.scrollLeft=r},getScrollAreaScrollLeft:function(){return t.area.scrollLeft},getScrollContentOffsetWidth:function(){return t.content.offsetWidth},getScrollAreaOffsetWidth:function(){return t.area.offsetWidth},computeScrollAreaClientRect:function(){return t.area.getBoundingClientRect()},computeScrollContentClientRect:function(){return t.content.getBoundingClientRect()},computeHorizontalScrollbarHeight:function(){return N(document)}};return new D(r)};r.prototype.getScrollPosition=function(){return this.foundation.getScrollPosition()};r.prototype.getScrollContentWidth=function(){return this.content.offsetWidth};r.prototype.incrementScroll=function(t){this.foundation.incrementScroll(t)};r.prototype.scrollTo=function(t){this.foundation.scrollTo(t)};return r}(d);
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var W={ACTIVE:"mdc-tab-indicator--active",FADE:"mdc-tab-indicator--fade",NO_TRANSITION:"mdc-tab-indicator--no-transition"};var Y={CONTENT_SELECTOR:".mdc-tab-indicator__content"};
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var B=function(t){c(r,t);function r(e){return t.call(this,s(s({},r.defaultAdapter),e))||this}Object.defineProperty(r,"cssClasses",{get:function(){return W},enumerable:false,configurable:true});Object.defineProperty(r,"strings",{get:function(){return Y},enumerable:false,configurable:true});Object.defineProperty(r,"defaultAdapter",{get:function(){return{addClass:function(){return undefined},removeClass:function(){return undefined},computeContentClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},setContentStyleProperty:function(){return undefined}}},enumerable:false,configurable:true});r.prototype.computeContentClientRect=function(){return this.adapter.computeContentClientRect()};return r}(u);
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var K=function(t){c(r,t);function r(){return t!==null&&t.apply(this,arguments)||this}r.prototype.activate=function(){this.adapter.addClass(B.cssClasses.ACTIVE)};r.prototype.deactivate=function(){this.adapter.removeClass(B.cssClasses.ACTIVE)};return r}(B);
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var H=function(t){c(r,t);function r(){return t!==null&&t.apply(this,arguments)||this}r.prototype.activate=function(t){if(!t){this.adapter.addClass(B.cssClasses.ACTIVE);return}var r=this.computeContentClientRect();var e=t.width/r.width;var n=t.left-r.left;this.adapter.addClass(B.cssClasses.NO_TRANSITION);this.adapter.setContentStyleProperty("transform","translateX("+n+"px) scaleX("+e+")");this.computeContentClientRect();this.adapter.removeClass(B.cssClasses.NO_TRANSITION);this.adapter.addClass(B.cssClasses.ACTIVE);this.adapter.setContentStyleProperty("transform","")};r.prototype.deactivate=function(){this.adapter.removeClass(B.cssClasses.ACTIVE)};return r}(B);
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var V=function(t){c(r,t);function r(){return t!==null&&t.apply(this,arguments)||this}r.attachTo=function(t){return new r(t)};r.prototype.initialize=function(){this.content=this.root.querySelector(B.strings.CONTENT_SELECTOR)};r.prototype.computeContentClientRect=function(){return this.foundation.computeContentClientRect()};r.prototype.getDefaultFoundation=function(){var t=this;var r={addClass:function(r){return t.root.classList.add(r)},removeClass:function(r){return t.root.classList.remove(r)},computeContentClientRect:function(){return t.content.getBoundingClientRect()},setContentStyleProperty:function(r,e){t.content.style.setProperty(r,e)}};if(this.root.classList.contains(B.cssClasses.FADE)){return new K(r)}return new H(r)};r.prototype.activate=function(t){this.foundation.activate(t)};r.prototype.deactivate=function(){this.foundation.deactivate()};return r}(d);
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var F={ACTIVE:"mdc-tab--active"};var X={ARIA_SELECTED:"aria-selected",CONTENT_SELECTOR:".mdc-tab__content",INTERACTED_EVENT:"MDCTab:interacted",RIPPLE_SELECTOR:".mdc-tab__ripple",TABINDEX:"tabIndex",TAB_INDICATOR_SELECTOR:".mdc-tab-indicator"};
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var U=function(t){c(r,t);function r(e){var n=t.call(this,s(s({},r.defaultAdapter),e))||this;n.focusOnActivate=true;return n}Object.defineProperty(r,"cssClasses",{get:function(){return F},enumerable:false,configurable:true});Object.defineProperty(r,"strings",{get:function(){return X},enumerable:false,configurable:true});Object.defineProperty(r,"defaultAdapter",{get:function(){return{addClass:function(){return undefined},removeClass:function(){return undefined},hasClass:function(){return false},setAttr:function(){return undefined},activateIndicator:function(){return undefined},deactivateIndicator:function(){return undefined},notifyInteracted:function(){return undefined},getOffsetLeft:function(){return 0},getOffsetWidth:function(){return 0},getContentOffsetLeft:function(){return 0},getContentOffsetWidth:function(){return 0},focus:function(){return undefined}}},enumerable:false,configurable:true});r.prototype.handleClick=function(){this.adapter.notifyInteracted()};r.prototype.isActive=function(){return this.adapter.hasClass(F.ACTIVE)};r.prototype.setFocusOnActivate=function(t){this.focusOnActivate=t};r.prototype.activate=function(t){this.adapter.addClass(F.ACTIVE);this.adapter.setAttr(X.ARIA_SELECTED,"true");this.adapter.setAttr(X.TABINDEX,"0");this.adapter.activateIndicator(t);if(this.focusOnActivate){this.adapter.focus()}};r.prototype.deactivate=function(){if(!this.isActive()){return}this.adapter.removeClass(F.ACTIVE);this.adapter.setAttr(X.ARIA_SELECTED,"false");this.adapter.setAttr(X.TABINDEX,"-1");this.adapter.deactivateIndicator()};r.prototype.computeDimensions=function(){var t=this.adapter.getOffsetWidth();var r=this.adapter.getOffsetLeft();var e=this.adapter.getContentOffsetWidth();var n=this.adapter.getContentOffsetLeft();return{contentLeft:r+n,contentRight:r+n+e,rootLeft:r,rootRight:r+t}};return r}(u);
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var G=function(t){c(r,t);function r(){return t!==null&&t.apply(this,arguments)||this}r.attachTo=function(t){return new r(t)};r.prototype.initialize=function(t,r){if(t===void 0){t=function(t,r){return new p(t,r)}}if(r===void 0){r=function(t){return new V(t)}}this.id=this.root.id;var e=new b(p.createAdapter(this));this.ripple=t(this.root,e);var n=this.root.querySelector(U.strings.TAB_INDICATOR_SELECTOR);this.tabIndicator=r(n);this.content=this.root.querySelector(U.strings.CONTENT_SELECTOR)};r.prototype.initialSyncWithDOM=function(){var t=this;this.handleClick=function(){t.foundation.handleClick()};this.listen("click",this.handleClick)};r.prototype.destroy=function(){this.unlisten("click",this.handleClick);this.ripple.destroy();t.prototype.destroy.call(this)};r.prototype.getDefaultFoundation=function(){var t=this;var r={setAttr:function(r,e){return t.root.setAttribute(r,e)},addClass:function(r){return t.root.classList.add(r)},removeClass:function(r){return t.root.classList.remove(r)},hasClass:function(r){return t.root.classList.contains(r)},activateIndicator:function(r){t.tabIndicator.activate(r)},deactivateIndicator:function(){t.tabIndicator.deactivate()},notifyInteracted:function(){return t.emit(U.strings.INTERACTED_EVENT,{tabId:t.id},true)},getOffsetLeft:function(){return t.root.offsetLeft},getOffsetWidth:function(){return t.root.offsetWidth},getContentOffsetLeft:function(){return t.content.offsetLeft},getContentOffsetWidth:function(){return t.content.offsetWidth},focus:function(){return t.root.focus()}};return new U(r)};Object.defineProperty(r.prototype,"active",{get:function(){return this.foundation.isActive()},enumerable:false,configurable:true});Object.defineProperty(r.prototype,"focusOnActivate",{set:function(t){this.foundation.setFocusOnActivate(t)},enumerable:false,configurable:true});r.prototype.activate=function(t){this.foundation.activate(t)};r.prototype.deactivate=function(){this.foundation.deactivate()};r.prototype.computeIndicatorClientRect=function(){return this.tabIndicator.computeContentClientRect()};r.prototype.computeDimensions=function(){return this.foundation.computeDimensions()};r.prototype.focus=function(){this.root.focus()};return r}(d);
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var q={ARROW_LEFT_KEY:"ArrowLeft",ARROW_RIGHT_KEY:"ArrowRight",END_KEY:"End",ENTER_KEY:"Enter",HOME_KEY:"Home",SPACE_KEY:"Space",TAB_ACTIVATED_EVENT:"MDCTabBar:activated",TAB_SCROLLER_SELECTOR:".mdc-tab-scroller",TAB_SELECTOR:".mdc-tab"};var J={ARROW_LEFT_KEYCODE:37,ARROW_RIGHT_KEYCODE:39,END_KEYCODE:35,ENTER_KEYCODE:13,EXTRA_SCROLL_AMOUNT:20,HOME_KEYCODE:36,SPACE_KEYCODE:32};
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var Q=new Set;Q.add(q.ARROW_LEFT_KEY);Q.add(q.ARROW_RIGHT_KEY);Q.add(q.END_KEY);Q.add(q.HOME_KEY);Q.add(q.ENTER_KEY);Q.add(q.SPACE_KEY);var Z=new Map;Z.set(J.ARROW_LEFT_KEYCODE,q.ARROW_LEFT_KEY);Z.set(J.ARROW_RIGHT_KEYCODE,q.ARROW_RIGHT_KEY);Z.set(J.END_KEYCODE,q.END_KEY);Z.set(J.HOME_KEYCODE,q.HOME_KEY);Z.set(J.ENTER_KEYCODE,q.ENTER_KEY);Z.set(J.SPACE_KEYCODE,q.SPACE_KEY);var $=function(t){c(r,t);function r(e){var n=t.call(this,s(s({},r.defaultAdapter),e))||this;n.useAutomaticActivation=false;return n}Object.defineProperty(r,"strings",{get:function(){return q},enumerable:false,configurable:true});Object.defineProperty(r,"numbers",{get:function(){return J},enumerable:false,configurable:true});Object.defineProperty(r,"defaultAdapter",{get:function(){return{scrollTo:function(){return undefined},incrementScroll:function(){return undefined},getScrollPosition:function(){return 0},getScrollContentWidth:function(){return 0},getOffsetWidth:function(){return 0},isRTL:function(){return false},setActiveTab:function(){return undefined},activateTabAtIndex:function(){return undefined},deactivateTabAtIndex:function(){return undefined},focusTabAtIndex:function(){return undefined},getTabIndicatorClientRectAtIndex:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getTabDimensionsAtIndex:function(){return{rootLeft:0,rootRight:0,contentLeft:0,contentRight:0}},getPreviousActiveTabIndex:function(){return-1},getFocusedTabIndex:function(){return-1},getIndexOfTabById:function(){return-1},getTabListLength:function(){return 0},notifyTabActivated:function(){return undefined}}},enumerable:false,configurable:true});r.prototype.setUseAutomaticActivation=function(t){this.useAutomaticActivation=t};r.prototype.activateTab=function(t){var r=this.adapter.getPreviousActiveTabIndex();if(!this.indexIsInRange(t)||t===r){return}var e;if(r!==-1){this.adapter.deactivateTabAtIndex(r);e=this.adapter.getTabIndicatorClientRectAtIndex(r)}this.adapter.activateTabAtIndex(t,e);this.scrollIntoView(t);this.adapter.notifyTabActivated(t)};r.prototype.handleKeyDown=function(t){var r=this.getKeyFromEvent(t);if(r===undefined){return}if(!this.isActivationKey(r)){t.preventDefault()}if(this.useAutomaticActivation){if(this.isActivationKey(r)){return}var e=this.determineTargetFromKey(this.adapter.getPreviousActiveTabIndex(),r);this.adapter.setActiveTab(e);this.scrollIntoView(e)}else{var n=this.adapter.getFocusedTabIndex();if(this.isActivationKey(r)){this.adapter.setActiveTab(n)}else{var e=this.determineTargetFromKey(n,r);this.adapter.focusTabAtIndex(e);this.scrollIntoView(e)}}};r.prototype.handleTabInteraction=function(t){this.adapter.setActiveTab(this.adapter.getIndexOfTabById(t.detail.tabId))};r.prototype.scrollIntoView=function(t){if(!this.indexIsInRange(t)){return}if(t===0){this.adapter.scrollTo(0);return}if(t===this.adapter.getTabListLength()-1){this.adapter.scrollTo(this.adapter.getScrollContentWidth());return}if(this.isRTL()){this.scrollIntoViewImplRTL(t);return}this.scrollIntoViewImpl(t)};r.prototype.determineTargetFromKey=function(t,r){var e=this.isRTL();var n=this.adapter.getTabListLength()-1;var i=r===q.END_KEY;var o=r===q.ARROW_LEFT_KEY&&!e||r===q.ARROW_RIGHT_KEY&&e;var a=r===q.ARROW_RIGHT_KEY&&!e||r===q.ARROW_LEFT_KEY&&e;var c=t;if(i){c=n}else if(o){c-=1}else if(a){c+=1}else{c=0}if(c<0){c=n}else if(c>n){c=0}return c};r.prototype.calculateScrollIncrement=function(t,r,e,n){var i=this.adapter.getTabDimensionsAtIndex(r);var o=i.contentLeft-e-n;var a=i.contentRight-e;var c=a-J.EXTRA_SCROLL_AMOUNT;var s=o+J.EXTRA_SCROLL_AMOUNT;if(r<t){return Math.min(c,0)}return Math.max(s,0)};r.prototype.calculateScrollIncrementRTL=function(t,r,e,n,i){var o=this.adapter.getTabDimensionsAtIndex(r);var a=i-o.contentLeft-e;var c=i-o.contentRight-e-n;var s=c+J.EXTRA_SCROLL_AMOUNT;var l=a-J.EXTRA_SCROLL_AMOUNT;if(r>t){return Math.max(s,0)}return Math.min(l,0)};r.prototype.findAdjacentTabIndexClosestToEdge=function(t,r,e,n){var i=r.rootLeft-e;var o=r.rootRight-e-n;var a=i+o;var c=i<0||a<0;var s=o>0||a>0;if(c){return t-1}if(s){return t+1}return-1};r.prototype.findAdjacentTabIndexClosestToEdgeRTL=function(t,r,e,n,i){var o=i-r.rootLeft-n-e;var a=i-r.rootRight-e;var c=o+a;var s=o>0||c>0;var l=a<0||c<0;if(s){return t+1}if(l){return t-1}return-1};r.prototype.getKeyFromEvent=function(t){if(Q.has(t.key)){return t.key}return Z.get(t.keyCode)};r.prototype.isActivationKey=function(t){return t===q.SPACE_KEY||t===q.ENTER_KEY};r.prototype.indexIsInRange=function(t){return t>=0&&t<this.adapter.getTabListLength()};r.prototype.isRTL=function(){return this.adapter.isRTL()};r.prototype.scrollIntoViewImpl=function(t){var r=this.adapter.getScrollPosition();var e=this.adapter.getOffsetWidth();var n=this.adapter.getTabDimensionsAtIndex(t);var i=this.findAdjacentTabIndexClosestToEdge(t,n,r,e);if(!this.indexIsInRange(i)){return}var o=this.calculateScrollIncrement(t,i,r,e);this.adapter.incrementScroll(o)};r.prototype.scrollIntoViewImplRTL=function(t){var r=this.adapter.getScrollPosition();var e=this.adapter.getOffsetWidth();var n=this.adapter.getTabDimensionsAtIndex(t);var i=this.adapter.getScrollContentWidth();var o=this.findAdjacentTabIndexClosestToEdgeRTL(t,n,r,e,i);if(!this.indexIsInRange(o)){return}var a=this.calculateScrollIncrementRTL(t,o,r,e,i);this.adapter.incrementScroll(a)};return r}(u);
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/var tt=$.strings;var rt=0;var et=function(t){c(r,t);function r(){return t!==null&&t.apply(this,arguments)||this}r.attachTo=function(t){return new r(t)};Object.defineProperty(r.prototype,"focusOnActivate",{set:function(t){var r,e;try{for(var n=h(this.tabList),i=n.next();!i.done;i=n.next()){var o=i.value;o.focusOnActivate=t}}catch(t){r={error:t}}finally{try{if(i&&!i.done&&(e=n.return))e.call(n)}finally{if(r)throw r.error}}},enumerable:false,configurable:true});Object.defineProperty(r.prototype,"useAutomaticActivation",{set:function(t){this.foundation.setUseAutomaticActivation(t)},enumerable:false,configurable:true});r.prototype.initialize=function(t,r){if(t===void 0){t=function(t){return new G(t)}}if(r===void 0){r=function(t){return new P(t)}}this.tabList=this.instantiateTabs(t);this.tabScroller=this.instantiatetabScroller(r)};r.prototype.initialSyncWithDOM=function(){var t=this;this.handleTabInteraction=function(r){t.foundation.handleTabInteraction(r)};this.handleKeyDown=function(r){t.foundation.handleKeyDown(r)};this.listen(U.strings.INTERACTED_EVENT,this.handleTabInteraction);this.listen("keydown",this.handleKeyDown);for(var r=0;r<this.tabList.length;r++){if(this.tabList[r].active){this.scrollIntoView(r);break}}};r.prototype.destroy=function(){var r,e;t.prototype.destroy.call(this);this.unlisten(U.strings.INTERACTED_EVENT,this.handleTabInteraction);this.unlisten("keydown",this.handleKeyDown);try{for(var n=h(this.tabList),i=n.next();!i.done;i=n.next()){var o=i.value;o.destroy()}}catch(t){r={error:t}}finally{try{if(i&&!i.done&&(e=n.return))e.call(n)}finally{if(r)throw r.error}}if(this.tabScroller){this.tabScroller.destroy()}};r.prototype.getDefaultFoundation=function(){var t=this;var r={scrollTo:function(r){t.tabScroller.scrollTo(r)},incrementScroll:function(r){t.tabScroller.incrementScroll(r)},getScrollPosition:function(){return t.tabScroller.getScrollPosition()},getScrollContentWidth:function(){return t.tabScroller.getScrollContentWidth()},getOffsetWidth:function(){return t.root.offsetWidth},isRTL:function(){return window.getComputedStyle(t.root).getPropertyValue("direction")==="rtl"},setActiveTab:function(r){t.foundation.activateTab(r)},activateTabAtIndex:function(r,e){t.tabList[r].activate(e)},deactivateTabAtIndex:function(r){t.tabList[r].deactivate()},focusTabAtIndex:function(r){t.tabList[r].focus()},getTabIndicatorClientRectAtIndex:function(r){return t.tabList[r].computeIndicatorClientRect()},getTabDimensionsAtIndex:function(r){return t.tabList[r].computeDimensions()},getPreviousActiveTabIndex:function(){for(var r=0;r<t.tabList.length;r++){if(t.tabList[r].active){return r}}return-1},getFocusedTabIndex:function(){var r=t.getTabElements();var e=document.activeElement;return r.indexOf(e)},getIndexOfTabById:function(r){for(var e=0;e<t.tabList.length;e++){if(t.tabList[e].id===r){return e}}return-1},getTabListLength:function(){return t.tabList.length},notifyTabActivated:function(r){return t.emit(tt.TAB_ACTIVATED_EVENT,{index:r},true)}};return new $(r)};r.prototype.activateTab=function(t){this.foundation.activateTab(t)};r.prototype.scrollIntoView=function(t){this.foundation.scrollIntoView(t)};r.prototype.getTabElements=function(){return[].slice.call(this.root.querySelectorAll(tt.TAB_SELECTOR))};r.prototype.instantiateTabs=function(t){return this.getTabElements().map((function(r){r.id=r.id||"mdc-tab-"+ ++rt;return t(r)}))};r.prototype.instantiatetabScroller=function(t){var r=this.root.querySelector(tt.TAB_SCROLLER_SELECTOR);if(r){return t(r)}return null};return r}(d);function nt(t,r){const e=t.findIndex((t=>t.active===true));const n=[...t];if(e!==-1){n[e]=Object.assi