1import{bt as u,b3 as $,bN as _,b1 as T,d$ as B}from"./Dl8XQm3y.js";function A(w,p){const{timeoutMs:I=15e3,enableTimeoutFallback:S=!0,sessionKey:l="exitIntent",maxTriggersPerSession:h=1}=p||{},e=u(!1),i=u(null),r=u(0),s=u(0),a=u(0),v=()=>{try{const t=sessionStorage.getItem(`${l}_count`);return t?parseInt(t,10):0}catch{return 0}},b=()=>{try{const t=v();sessionStorage.setItem(`${l}_count`,String(t+1))}catch{}},m=()=>v()<h,L=()=>{e.value=!1,r.value=0,s.value=0,a.value=0},d=t=>{if(e.value)return;const{clientY:n,clientX:y}=t,C=window.innerWidth;s.value++,r.value>0&&r.value-n>50&&a.value++,r.value=n;const Y=n<=5&&s.value>10,x=n<=30&&y>=C-80&&a.value>0,U=a.value>=2&&n<=50,W=n<=0;(Y||x||U||W)&&o()},g=t=>{e.value||t.clientY<=0&&s.value>5&&o()},f=()=>{setTimeout(()=>{!document.hasFocus()&&!e.value&&s.value>20&&o()},100)},o=()=>{e.value||m()&&(e.value=!0,b(),w(),c())},c=()=>{i.value&&(clearTimeout(i.value),i.value=null),document.removeEventListener("mousemove",d),document.removeEventListener("mouseleave",g),window.removeEventListener("blur",f)},M=()=>{S&&(i.value=setTimeout(()=>{e.value||o()},I)),document.addEventListener("mousemove",d,{passive:!0}),document.addEventListener("mouseleave",g,{passive:!0}),window.addEventListener("blur",f,{passive:!0})},E=()=>{try{sessionStorage.setItem(`${l}_count`,"0")}catch{}};return $(()=>{c()}),_(()=>{c()}),{isTriggered:B(e),sessionTriggerCount:T(()=>v()),canTriggerInSession:T(()=>m()),init:M,cleanup:c,reset:L,resetSession:E,trigger:o}}export{A as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.