(()=>{let e=document.querySelector("#the-list"),t=e?.querySelector('[data-slug="carousel-slider"] span.deactivate a'),a=document.querySelector("#carousel-slider-deactivate-feedback-dialog-wrapper"),r=a?.querySelector(".button--skip-feedback"),d=a?.querySelector(".button--submit-feedback"),i=a?.querySelector("form"),l=i.querySelectorAll("input[type=radio]");r.href=t?.getAttribute("href");r.addEventListener("click",(()=>{a.removeAttribute("open")})),d.addEventListener("click",(e=>{e.preventDefault(),d.classList.add("is-loading"),((e=null)=>new Promise((t=>{let a=new XMLHttpRequest;a.open("POST",window.ajaxurl),a.addEventListener("readystatechange",(()=>{a.readyState===XMLHttpRequest.DONE&&200===a.status&&t(!0)})),a.send(e)})))(new FormData(i)).then((()=>{r.click()})).finally((()=>{d.classList.add("is-loading")}))})),t.addEventListener("click",(e=>{e.preventDefault(),a&&a.setAttribute("open","")})),a.addEventListener("close",(()=>{a.removeAttribute("open")})),l.forEach((e=>{e.addEventListener("change",(e=>{e.target.value&&d.hasAttribute("disabled")&&d.removeAttribute("disabled")}))}))})();