"use strict";var tabControls=getArrayOfElements("[data-tab]"),tabSets=getArrayOfElements("[data-tabset]"),tabContainer=getArrayOfElements(".tabset-container"),tabSvg=document.getElementsByClassName("tab-svg"),tabWrapper=document.getElementById("tabWrapper"),tabHeader=document.getElementById("tabHeader"),currentTab=void 0;tabControls.map(function(n){n.addEventListener("click",function(){var t=n.attributes["data-tab-controls"].value,i=n;tabControls.forEach(function(n){t===n.attributes["data-tab-controls"].value?(i.classList.add("active"),animateTabs(i)):n.classList.remove("active")});animateContent(t)})});var animateContent=function(n){tabSets.map(function(t){n===t.attributes["data-tabset"].value?(t.classList.add("active"),t.attributes["data-tabset-active"].value="true",tabContainer[0].style.height=t.clientHeight+"px"):(t.classList.remove("active"),t.attributes["data-tabset-active"].value=!1)})},getInitHeight=function(){tabSets.map(function(n){tabControls.map(function(t){t.attributes["data-tab-active"].value==="true"&&(currentTab=t,n.attributes["data-tabset-active"].value==="true"&&(tabContainer[0].style.height=n.clientHeight+"px",animateTabs(currentTab)))})})},animateTabs=function(n){tabSvg[0].style.width=n.clientWidth+"px";tabSvg[0].style.height=n.clientHeight+"px";tabSvg[0].style.transform="translate3d("+n.offsetLeft+"px,0,0)"};document.addEventListener("DOMContentLoaded",function(){setTimeout(function(){var n=checkChildNum();n&&getInitHeight()},0)});var checkChildNum=function(){return tabHeader.childElementCount<=1?(tabWrapper.style.display="none",!1):!0},resizeTimeout=void 0,actualResizeHandler=function(){animateTabs(currentTab)},resizeThrottler=function(){resizeTimeout||(resizeTimeout=setTimeout(function(){resizeTimeout=null;actualResizeHandler()},66))};window.addEventListener("resize",resizeThrottler,!1)