"use strict";(self.webpackChunkporta_frontend_starter_kit=self.webpackChunkporta_frontend_starter_kit||[]).push([[318],{2318:function(t,e,n){n.r(e),n.d(e,{initTabs:function(){return s}});const s=()=>{const t=document.querySelectorAll(".tabs");for(const e of t){const t={borders:!1,boxed:!1,height:"auto",hideHash:!0,hashTag:!0,selectedTab:1,width:500},n=e.querySelectorAll(".tab-nav__link"),s=e.querySelectorAll(".tab-content .tab");if(!n.length||!s.length)return;for(const e of n){const c=document.querySelector(e.getAttribute("href"));if(!c)return;e.addEventListener("click",(o=>{const r=e;for(const t of s)t.classList.remove("tab--selected"),c.classList.add("tab--selected");for(const t of n)t.classList.remove("tab-nav__link--selected"),r.classList.add("tab-nav__link--selected");t.hideHash&&o.preventDefault()}))}const c=window.location.hash.substring(1);if(c){const t=document.querySelector('[href="#'+c+'"]');t&&t.dispatchEvent(new Event("click"))}else n.length&&e.querySelector(".tab-content .tab").classList.add("tab--selected");window.addEventListener("hashchange",(t=>{const e=window.location.hash.substring(1);if(e){const t=document.querySelector('[href="#'+e+'"]');t&&t.dispatchEvent(new Event("click"))}}))}}}}]);