!function(){"use strict";function a(a,e=null){if(!a)return;const s=a.querySelector("i"),t=a.classList.contains("cta-play"),c=a.classList.contains("cta-pause"),l=null===e?t:!0===e,n=a.getAttribute("aria-label"),i=a.dataset.toggleLabel;(null===e||l&&t||!l&&c)&&(a.setAttribute("aria-label",i),a.dataset.toggleLabel=n),l?(a.classList.remove("cta-play"),a.classList.add("cta-pause"),s?.classList.add("fa-circle-pause","cta-pause-icon"),s?.classList.remove("fa-circle-play","cta-play-icon")):(a.classList.add("cta-play"),a.classList.remove("cta-pause"),s?.classList.add("fa-circle-play","cta-play-icon"),s?.classList.remove("fa-circle-pause","cta-pause-icon"))}const e=document.querySelectorAll(".purdue-home-diagonal-hero");e&&e.length>0&&e.forEach(e=>{const s=e.querySelector(".cta-btnctrl"),t=e.querySelector("video");s&&t&&(s.addEventListener("click",()=>{s.classList.contains("cta-play")?t.play():t.pause(),a(s)}),t&&t.classList.contains("no-loop")&&t.addEventListener("ended",e=>{a(s,!1)}),t&&(t.paused||t.ended)&&!t.classList.contains("no-loop")&&(t.addEventListener("play",()=>{console,a(s,!0)}),t.addEventListener("pause",()=>{console,a(s,!1)})))})}();