document.addEventListener("DOMContentLoaded",function(){var e=document.querySelectorAll('[data-plugin="choices"]');e&&e.forEach(function(e){new Choices(e,{placeholderValue:"This is a placeholder set in the config",searchPlaceholderValue:"Search results here"})})});var CheckoutTab=document.querySelectorAll(".checkout-tab");CheckoutTab&&document.querySelectorAll(".checkout-tab").forEach(function(o){o.querySelectorAll(".nexttab")&&o.querySelectorAll(".nexttab").forEach(function(t){var e=o.querySelectorAll('button[data-bs-toggle="pill"]');e&&(e.forEach(function(e){e.addEventListener("show.bs.tab",function(e){e.target.classList.add("done")})}),t.addEventListener("click",function(){var e=t.getAttribute("data-nexttab");e&&document.getElementById(e).click()}))}),document.querySelectorAll(".previestab")&&o.querySelectorAll(".previestab").forEach(function(c){c.addEventListener("click",function(){var e=c.getAttribute("data-previous");if(e){var t=c.closest("form").querySelectorAll(".custom-nav .done").length;if(t){for(var o=t-1;o<t;o++)c.closest("form").querySelectorAll(".custom-nav .done")[o]&&c.closest("form").querySelectorAll(".custom-nav .done")[o].classList.remove("done");document.getElementById(e).click()}}})});var c=o.querySelectorAll('button[data-bs-toggle="pill"]');c&&c.forEach(function(e,t){e.setAttribute("data-position",t),e.addEventListener("click",function(){0<o.querySelectorAll(".custom-nav .done").length&&o.querySelectorAll(".custom-nav .done").forEach(function(e){e.classList.remove("done")});for(var e=0;e<=t;e++)c[e].classList.contains("active")?c[e].classList.remove("done"):c[e].classList.add("done")})})});