(()=>{"use strict";document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".ablocks-block--toggle").forEach(l=>{(l=>{const e=l.querySelectorAll(".ablocks-block--toggle-child"),c=l.querySelector(".ablocks-toggle__checkbox"),o=l?.querySelector(".ablocks-toggle__label--left"),t=l?.querySelector(".ablocks-toggle__label--right");c.onchange=l=>a(l.target.checked);const a=l=>{l?(e[1].classList.add("ablocks-block--toggle-child--active"),e[0].classList.remove("ablocks-block--toggle-child--active"),o.classList.remove("ablocks-toggle__label--active"),t.classList.add("ablocks-toggle__label--active")):(e[0].classList.add("ablocks-block--toggle-child--active"),e[1].classList.remove("ablocks-block--toggle-child--active"),o.classList.add("ablocks-toggle__label--active"),t.classList.remove("ablocks-toggle__label--active"))};a(c.checked)})(l)})})})();