(()=>{(function(){"use strict";$(".accordion").each(function(){$(this).find(".accordion-item.show").length||t($(this).find(".accordion-button").first(),"show")}),$("body").on("click",".accordion-button",function(){t(this)});function t(o,c="toggle"){$(o).closest(".accordion").find(".accordion-button").each(function(){if($(this).closest(".accordion-item").hasClass("show")&&this!==o&&(c=="toggle"||c=="hide")){let i=new Event("hide.tw.accordion");$(this).closest(".accordion-header")[0].dispatchEvent(i)}if(!$(this).closest(".accordion-item").hasClass("show")&&this===o&&(c=="toggle"||c=="show")){let i=new Event("show.tw.accordion");$(this).closest(".accordion-header")[0].dispatchEvent(i)}});let e=!$(o).closest(".accordion-item").hasClass("show");$(o).closest(".accordion").find(".accordion-collapse").each(function(){$(this).slideUp(300,i=>{$(i).closest(".accordion-item").removeClass("show"),$(i).closest(".accordion-item").find(".accordion-button").attr("aria-expanded",!1)})}),setTimeout(()=>{let i=$(o).closest(".accordion-item"),s=()=>{$(i).removeClass("show"),$(o).attr("aria-expanded",!1),$(o).closest(".accordion-item").find(".accordion-collapse").slideUp()},a=()=>{$(i).addClass("show"),$(o).attr("aria-expanded",!0),$(o).closest(".accordion-item").find(".accordion-collapse").slideDown()};c==="toggle"?e?a():s():c==="show"?a():s()},300)}function n(o){return{show(){t(o,"show")},hide(){t(o,"hide")},toggle(){t(o)}}}(function(){$(".accordion-button").each(function(){$(this).closest(".accordion-header")[0].__accordion=n(this)}),window.tailwind===void 0&&(window.tailwind={}),window.tailwind.Accordion={getInstance(c){return c.__accordion},getOrCreateInstance(c){return c.__accordion===void 0?n(c):c.__accordion}}})()})();})();
