!function(){function t(){document.querySelectorAll(".fb-tabs-wrapper").forEach(t=>{const e=t.querySelector(".fb-tabs-wrap");e&&function(t){if(!t)return;const e=t.querySelector(".fb-tabs-panel");if(!e)return;const a=[...e.querySelectorAll(".fb-tab")],n=[...t.querySelectorAll(".fb-tabs-body-container")];function r(e){const r=Math.max(0,a.length-1),c=Math.min(Math.max(e,0),r);t.dataset.tabActive=String(c),a.forEach((t,e)=>{const a=e===c;a?t.classList.add("fb-tabs-active"):t.classList.remove("fb-tabs-active"),t.setAttribute("aria-selected",String(a)),t.setAttribute("tabIndex",a?"0":"-1")}),n.forEach((e,a)=>{const n=e.classList.contains(`fb-inner-tab-${c}`),r=e.id===`fb-tabs-panel-${t.dataset.blockId||"x"}-${c}`,s=n||r||a===c;e.style.display=s?"block":"none"})}r(parseInt(t.getAttribute("data-tab-active")||"0",10)||0),a.forEach((t,e)=>{t.addEventListener("click",function(a){a.preventDefault(),r(e),t.focus()}),t.addEventListener("keydown",function(t){let n=e;switch(t.key){case"ArrowLeft":t.preventDefault(),n=e>0?e-1:a.length-1;break;case"ArrowRight":t.preventDefault(),n=e<a.length-1?e+1:0;break;case"Home":t.preventDefault(),n=0;break;case"End":t.preventDefault(),n=a.length-1;break;case"Enter":case" ":return t.preventDefault(),void r(e);default:return}r(n),a[n].focus()})})}(e)})}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",t):t(),window.fbTabsReinit=t}();