|
- import{h as v,s as x,d as T,N as b,o as C,e as k,K as l}from"./index-080862c1.js";const S=""+new URL("../notFound/32.svg",import.meta.url).href,m=({strings:n=["Put your strings here...","and Enjoy!"],typeSpeed:r=100,backSpeed:o=50,backDelay:a=500,startDelay:c=500,cursorChar:i="|",placeholder:d=!1,showCursor:u=!0,disableBackTyping:f=!1,onFinished:_=function(){},loop:h=!0})=>({strings:n,typeSpeed:r,backSpeed:o,cursorChar:i,backDelay:a,placeholder:d,startDelay:c,showCursor:u,loop:h,disableBackTyping:f,onFinished:_}),I=(n,r)=>{let o=0,a,c;const i=(e,t)=>{o===a&&t.loop&&(o=0),setTimeout(()=>{d(e[o],t)},t.startDelay)},d=(e,t)=>{let s=0,y=e.length,p=setInterval(()=>{if(t.placeholder?n.placeholder+=e[s]:n.textContent+=e[s],++s===y)return u(p,t)},t.typeSpeed)},u=(e,t)=>{if(clearInterval(e),t.disableBackTyping&&o===a-1||!t.loop&&o===a-1)return t.onFinished();setTimeout(()=>f(t),t.backDelay)},f=e=>{let t=e.placeholder?n.placeholder:n.textContent,s=t.length,y=setInterval(()=>{if(e.placeholder?n.placeholder=n.placeholder.substr(0,--s):n.textContent=t.substr(0,--s),s===0)return _(y,e)},e.backSpeed)},_=(e,t)=>{clearInterval(e),++o,i(c,t)},h=(e,t)=>{let s=document.createElement("span");s.classList.add("ityped-cursor"),s.textContent="|",s.textContent=t.cursorChar,e.insertAdjacentElement("afterend",s)};return(e=>{let t=m(e||{}),s=t.strings;c=s,a=s.length,typeof n=="string"&&(n=document.querySelector(n)),t.showCursor&&h(n,t),i(s,t)})(r)},E=n=>{const r=v();return x(()=>{I(r.value,{strings:n,showCursor:!1,disableBackTyping:!0})}),r},R={class:"flex flex-wrap h-screen text-center justify-around items-center"},w={class:"font-blod desc"},B=l("div",{class:"text-7xl code"},"404",-1),F=l("img",{src:S,class:"cover",alt:"page not found"},null,-1),D=T({__name:"[...notFound]",setup(n){const r=E(["is not found!"]),o=b(),a=()=>o.push("/");return(c,i)=>(C(),k("div",R,[l("div",w,[B,l("div",{ref_key:"typedRef",ref:r,class:"text-3xl content"},"The Page",512),l("button",{active:"scale-90 transform",class:"rounded-lg transition btn",onClick:a}," 👉 Go Home ")]),F]))}});const g={};typeof g=="function"&&g(D);export{D as default};
|