{"version":3,"sources":["../assets/scripts/blocks/content-tabber.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"content-tabber.js","sourcesContent":["let tabbed_content_links = document.querySelectorAll('.content-tabber--actions li a');\r\n\r\ntabbed_content_links.forEach((el, index) => {\r\n el.addEventListener( 'click', content_tabber_event );\r\n});\r\n\r\nfunction content_tabber_event(e) {\r\n\r\n e.preventDefault();\r\n\r\n let el = e.currentTarget;\r\n let tabber = window.helpers.parents(el, '.content-tabber')[0];\r\n let target = el.getAttribute('href');\r\n let tab = document.querySelector('.content-tabber--tabs ' + target);\r\n let tabs_sel = tabber.querySelectorAll(`:scope ${'.content-tabber--actions a'}`);\r\n let tabs = tabber.querySelectorAll(`:scope ${'.content-tabber--tab'}`);\r\n \r\n tabs_sel.forEach((tabbed_links_el, index) => {\r\n tabbed_links_el.classList.remove('active');\r\n });\r\n\r\n tabs.forEach((tabbed_content_el, index) => {\r\n window.helpers.hide(tabbed_content_el);\r\n });\r\n\r\n el.classList.add('active');\r\n \r\n window.helpers.fadeIn(tab, 'block');\r\n\r\n}"],"sourceRoot":"assets/scripts/"}