document.addEventListener("DOMContentLoaded",function(e){let t=document.querySelector(".toast-ex"),s=document.querySelector(".toast-placement-ex"),o=document.querySelector("#showToastAnimation"),n=document.querySelector("#showToastPlacement"),i,c,a,l,r;function d(e){e&&null!==e._element&&(s&&(s.classList.remove(i),s.querySelector(".ti").classList.remove(i),DOMTokenList.prototype.remove.apply(s.classList,a)),t&&(t.classList.remove(i,c),t.querySelector(".ti").classList.remove(i)),e.dispose())}o&&(o.onclick=function(){l&&d(l),i=document.querySelector("#selectType").value,c=document.querySelector("#selectAnimation").value,t.classList.add(c),t.querySelector(".ti").classList.add(i),(l=new bootstrap.Toast(t)).show()}),n&&(n.onclick=function(){r&&d(r),i=document.querySelector("#selectTypeOpt").value,a=document.querySelector("#selectPlacement").value.split(" "),s.querySelector(".ti").classList.add(i),DOMTokenList.prototype.add.apply(s.classList,a),(r=new bootstrap.Toast(s)).show()});let u=-1;class m extends Notyf{_renderNotification(e){var t=super._renderNotification(e);return e.message&&(t.message.innerHTML=e.message),t}}let p=new m({duration:3e3,ripple:!0,dismissible:!1,position:{x:"right",y:"top"},types:[{type:"info",background:config.colors.info,className:"notyf__info",icon:{className:"icon-base ti tabler-info-circle-filled icon-md text-white",tagName:"i"}},{type:"warning",background:config.colors.warning,className:"notyf__warning",icon:{className:"icon-base ti tabler-alert-triangle-filled icon-md text-white",tagName:"i"}},{type:"success",background:config.colors.success,className:"notyf__success",icon:{className:"icon-base ti tabler-circle-check-filled icon-md text-white",tagName:"i"}},{type:"error",background:config.colors.danger,className:"notyf__error",icon:{className:"icon-base ti tabler-xbox-x-filled icon-md text-white",tagName:"i"}}]});document.getElementById("showNotification").addEventListener("click",()=>{var e=document.getElementById("message").value||(e=["Don't be pushed around by the fears in your mind. Be led by the dreams in your heart.",'<div class="mb-3"><input class="input-small form-control" value="Textbox"/>&nbsp;<a href="http://example.com" target="_blank" class="text-white">This is a hyperlink</a></div><div class="d-flex"><button type="button" id="okBtn" class="btn btn-primary btn-sm me-2">Close me</button><button type="button" id="surpriseBtn" class="btn btn-sm btn-secondary">Surprise me</button></div>',"Live the Life of Your Dreams","Believe in Yourself!","Be mindful. Be grateful. Be positive.","Accept yourself, love yourself!"])[u=(u+1)%e.length],t=document.getElementById("dismissible").checked,s=document.getElementById("ripple").checked,o=document.getElementById("duration").value,o=o?parseInt(o):3e3,n=document.querySelector('input[name="positiony"]:checked').value,n={x:document.querySelector('input[name="positionx"]:checked').value,y:n},o={type:document.querySelector('input[name="notificationType"]:checked').value,message:e,duration:o,dismissible:t,ripple:s,position:n};setTimeout(()=>{var e=document.getElementById("okBtn"),t=document.getElementById("surpriseBtn");e&&e.addEventListener("click",()=>{p.dismissAll()}),t&&t.addEventListener("click",()=>{p.success("Surprise! This is a new message.")})},100),p.open(o)}),document.getElementById("clearNotifications").addEventListener("click",()=>{p.dismissAll()})});