(()=>{(function(){"use strict";$("body").on("click","[data-tw-dismiss='alert']",function(){e($(this).closest(".alert"))});function s(t){$(t).fadeIn(300,function(){$(this).addClass("show");let i=new Event("shown.tw.alert");$(t)[0].dispatchEvent(i)});let n=new Event("show.tw.alert");$(t)[0].dispatchEvent(n)}function e(t){$(t).fadeOut(300,function(){$(this).removeClass("show");let i=new Event("hidden.tw.alert");$(t)[0].dispatchEvent(i)});let n=new Event("hide.tw.alert");$(t)[0].dispatchEvent(n)}function o(t){$(t).hasClass("show")?e(t):s(t)}function a(t){return{show(){s(t)},hide(){e(t)},toggle(){o(t)}}}(function(){$(".alert").each(function(){this.__alert=a(this)}),window.tailwind===void 0&&(window.tailwind={}),window.tailwind.Alert={getInstance(n){return n.__alert},getOrCreateInstance(n){return n.__alert===void 0?a(n):n.__alert}}})()})();})();
