!function(){"use strict";document.addEventListener("DOMContentLoaded",function(){let e=null,t=null,a=0,s=!1;const c=document.querySelector(".purdue-home-cta-hero__header-animate");if(c){const l=c.querySelectorAll("span.purdue-home-cta-hero__header-animate-item");if(l.length>0){function i(e){for(let e=0;e<l.length;e++)l[e].classList.add("hide"),l[e].classList.remove("slide-in","slide-out");const t=l[e];t.classList.remove("hide"),t.classList.add("slide-in")}function n(){s||(t=setTimeout(()=>{if(s)return;const e=l[a];e.classList.remove("slide-in"),e.classList.add("slide-out")},3500),e=setTimeout(()=>{s||(a=(a+1)%l.length,i(a),n())},4e3))}function o(){clearTimeout(e),clearTimeout(t),e=null,t=null}i(a),n();const u=document.querySelector(".purdue-home-cta-hero button.cta-btnctrl");u&&u.addEventListener("click",e=>{const t=e.currentTarget;t.querySelector("i"),t.classList.contains("cta-play")?(c.classList.remove("pause"),s=!1,o(),i(a=(a+1)%l.length),n()):(c.classList.add("pause"),s=!0,o()),function(e,t=null){if(!e)return;const a=e.querySelector("i"),s=e.classList.contains("cta-play"),c=e.classList.contains("cta-pause"),l=null===t?s:!0===t,i=e.getAttribute("aria-label"),n=e.dataset.toggleLabel;(null===t||l&&s||!l&&c)&&(e.setAttribute("aria-label",n),e.dataset.toggleLabel=i),l?(e.classList.remove("cta-play"),e.classList.add("cta-pause"),a?.classList.add("fa-circle-pause","cta-pause-icon"),a?.classList.remove("fa-circle-play","cta-play-icon")):(e.classList.add("cta-play"),e.classList.remove("cta-pause"),a?.classList.add("fa-circle-play","cta-play-icon"),a?.classList.remove("fa-circle-pause","cta-pause-icon"))}(t)})}}})}();