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