!function(){function t(){document.querySelectorAll(".fb-tabs-wrapper").forEach(t=>{const e=t.querySelector(".fb-tabs-wrap");e&&function(t,e){if(!t)return;const a=t.querySelector(".fb-tabs-panel");if(!a)return;const n=[...a.querySelectorAll(".fb-tab")],r=[...t.querySelectorAll(".fb-tabs-body-container")],i=e||t.closest(".fb-tabs-wrapper")||t,s=parseInt(i.getAttribute("data-tab-active")||"0",10)||0;let o=null,c=!1,l=s;function u(t){const e=i.getAttribute(t);if(!e)return null;const a=parseInt(e,10);return isNaN(a)?null:a}function b(){const t=window.innerWidth,e=u("data-tab-auto-interval-desktop")||3e3,a=u("data-tab-auto-interval-tablet"),n=u("data-tab-auto-interval-mobile");return t<=767?n||a||e:t<=1024&&a||e}function d(e){const a=Math.max(0,n.length-1),i=Math.min(Math.max(e,0),a);l=i,t.dataset.tabActive=String(i),n.forEach((t,e)=>{const a=e===i;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")}),r.forEach((e,a)=>{const n=e.classList.contains(`fb-inner-tab-${i}`),r=e.id===`fb-tabs-panel${i}`||e.id===`fb-tabs-panel-${t.dataset.blockID||"x"}-${i}`,s=n||r||a===i,o=e.closest(".fb-tabs-item-wrapper");o?(o.style.display=s?"block":"none",o.classList.toggle("fb-tabs-panel-active",s),o.setAttribute("aria-hidden",String(!s))):(e.style.display=s?"block":"none",e.classList.toggle("fb-tabs-panel-active",s)),e.setAttribute("aria-hidden",String(!s))})}function f(){if("auto"!==(i.getAttribute("data-tab-switch-mode")||"click"))return;v();const t=b();o=setTimeout(function t(){if(c||document.hidden)return void(o=setTimeout(t,200));d((l+1)%n.length);const e=b();o=setTimeout(t,e)},t)}function v(){o&&(clearTimeout(o),o=null)}function p(t){d(t),"auto"===(i.getAttribute("data-tab-switch-mode")||"click")&&(v(),f())}d(s),f(),i&&(i.addEventListener("mouseenter",()=>{"true"===i.getAttribute("data-tab-auto-pause-hover")&&(c=!0)}),i.addEventListener("mouseleave",()=>{c=!1})),n.forEach((t,e)=>{t.addEventListener("click",function(a){a.preventDefault(),p(e),t.focus()}),t.addEventListener("keydown",function(t){let a=e;switch(t.key){case"ArrowLeft":t.preventDefault(),a=e>0?e-1:n.length-1;break;case"ArrowRight":t.preventDefault(),a=e<n.length-1?e+1:0;break;case"Home":t.preventDefault(),a=0;break;case"End":t.preventDefault(),a=n.length-1;break;case"Enter":case" ":return t.preventDefault(),void p(e);default:return}p(a),n[a].focus()})})}(e,t)})}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",t):t(),window.fbTabsReinit=t}();