const cuteAlert=({url:e,type:t,title:n,message:s,img:o,buttonText:a="OK",confirmText:c="OK",vibrate:r=[],playSound:l=null,cancelText:i="Cancel",closeStyle:d})=>new Promise((e=>{const u=document.querySelector(".alert-wrapper");u&&u.remove();const m=document.querySelector("body"),v=document.getElementsByTagName("script");let b="";for(let e of v)e.src.includes("cute-alert.js")&&(b=e.src.substring(0,e.src.lastIndexOf("/")));let g=`\n \n `;if("question"===t&&(g=`\n
\n \n \n
\n `),r.length>0&&navigator.vibrate(r),null!==l){new Audio(l).play()}const y=`\n
\n
\n ${o===undefined?'
':'
'}\n X\n ${o===undefined?'':'
'+o+"
"}\n
\n
\n ${n}\n ${s}\n ${g}\n
\n
\n
\n `;m.insertAdjacentHTML("afterend",y);const p=document.querySelector(".alert-wrapper"),$=document.querySelector(".alert-frame"),f=document.querySelector(".alert-close");if("question"===t){const t=document.querySelector(".confirm-button"),n=document.querySelector(".cancel-button");t.addEventListener("click",(()=>{p.remove(),e("confirm")})),n.addEventListener("click",(()=>{p.remove(),e()}))}else{document.querySelector(".alert-button").addEventListener("click",(()=>{p.remove(),e("ok")}))}f.addEventListener("click",(()=>{p.remove(),e("close")})),$.addEventListener("click",(e=>{e.stopPropagation()}))})),cuteToast=({type:e,title:t,message:n,timer:s=5e3,vibrate:o=[],playSound:a=null})=>new Promise((c=>{const r=document.querySelector("body"),l=document.getElementsByTagName("script");let i="";for(let e of l)e.src.includes("cute-alert.js")&&(i=e.src.substring(0,e.src.lastIndexOf("/")));let d=document.querySelector(".toast-container");d||(r.insertAdjacentHTML("afterend",'
'),d=document.querySelector(".toast-container"));const u=id(),m=`\n
\n
\n
\n
\n '\n
\n ${t}\n ${n}\n
\n
X
\n
\n
\n
0&&navigator.vibrate(o),null!==a){new Audio(a).play()}setTimeout((()=>{b.remove(),c()}),s);document.getElementById(`${u}-toast-close`).addEventListener("click",(()=>{b.remove(),c()}))})),id=()=>"_"+Math.random().toString(36).substr(2,9);