{
  "version": 3,
  "sources": ["ssg:https://framer.com/m/framer/store.js@^1.0.0", "ssg:https://framerusercontent.com/modules/201pDNFsMbIE87CS4f2O/oxkDrDk3lHaaJOPS0wNE/ExitIntent.js"],
  "sourcesContent": ["import{useState,useEffect}from\"react\";import{Data,useObserveData}from\"framer\";export function createStore(state1){// Use Data so that a Preview reload resets the state\nconst dataStore=Data({state:Object.freeze({...state1})});// Create a set function that updates the state\nconst setDataStore=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(dataStore.state);}dataStore.state=Object.freeze({...dataStore.state,...newState});};// Store the initial state, copy the object if it's an object\nlet storeState=typeof state1===\"object\"?Object.freeze({...state1}):state1;// Keep a list of all the listeners, in the form of React hook setters\nconst storeSetters=new Set();// Create a set function that updates all the listeners / setters\nconst setStoreState=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(storeState);}storeState=typeof newState===\"object\"?Object.freeze({...storeState,...newState}):newState;// Update all the listeners / setters with the new value\nstoreSetters.forEach(setter=>setter(storeState));};// Create the actual hook based on everything above\nfunction useStore(){// Create the hook we are going to use as a listener\nconst[state,setState]=useState(storeState);// If we unmount the component using this hook, we need to remove the listener\n// @ts-ignore\nuseEffect(()=>{// But right now, we need to add the listener\nstoreSetters.add(setState);return()=>storeSetters.delete(setState);},[]);// If Data context exists, use Data, otherwise use vanilla React state\nif(useObserveData()===true){useObserveData();return[dataStore.state,setDataStore];}else{// Return the state and a function to update the central store\nreturn[state,setStoreState];}}return useStore;}\nexport const __FramerMetadata__ = {\"exports\":{\"createStore\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./createStore.map", "/*\n * ExitIntent by framer.today - Fixed Version\n * v1.2.0\n * https://framer.today/license\n *\n */import{jsx as _jsx}from\"react/jsx-runtime\";import React from\"react\";import{motion}from\"framer-motion\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";const useStore=createStore({isOverlayVisible:false});export function withWindowLeaveOverlay(Component){return function WrappedComponent(props){const[store,setStore]=useStore();const[overlayDismissed,setOverlayDismissed]=React.useState(false);const[isInitialized,setIsInitialized]=React.useState(false);// Verificar sessionStorage apenas uma vez e inicializar visibilidade do overlay\nReact.useEffect(()=>{const dismissed=sessionStorage.getItem(\"overlayDismissed\")===\"true\";setOverlayDismissed(dismissed);if(dismissed){setStore({isOverlayVisible:false});}setIsInitialized(true);},[setStore]);// Listener para eventos de mouseout para detectar inten\u00E7\u00E3o de sa\u00EDda\nReact.useEffect(()=>{if(overlayDismissed||!isInitialized)return;const handleMouseLeave=event=>{// Verificar novamente se foi dispensado durante a sess\u00E3o\nif(sessionStorage.getItem(\"overlayDismissed\")===\"true\")return;const{clientX,clientY,relatedTarget}=event;const{innerWidth,innerHeight}=window;// Detectar quando o mouse sai completamente da janela\nif(!relatedTarget&&(clientY<=0||clientY>=innerHeight||clientX<=0||clientX>=innerWidth)){setStore({isOverlayVisible:true});}};document.addEventListener(\"mouseout\",handleMouseLeave);return()=>document.removeEventListener(\"mouseout\",handleMouseLeave);},[overlayDismissed,isInitialized,setStore]);const dismissOverlay=React.useCallback(event=>{event.preventDefault();event.stopPropagation();setStore({isOverlayVisible:false});sessionStorage.setItem(\"overlayDismissed\",\"true\");setOverlayDismissed(true);},[setStore]);// Determinar se o overlay deve estar vis\u00EDvel\nconst shouldShowOverlay=isInitialized&&store.isOverlayVisible&&!overlayDismissed;// Estilos condicionais baseados na visibilidade\nconst overlayStyle=shouldShowOverlay?{// Overlay vis\u00EDvel - tamanho completo\nposition:\"fixed\",top:0,left:0,width:\"100%\",height:\"100vh\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",backgroundColor:\"rgba(0, 0, 0, 0.8)\",zIndex:1e3,cursor:\"pointer\",pointerEvents:\"auto\",opacity:1}:{// Overlay oculto - tamanho m\u00EDnimo e sem captura de eventos\nposition:\"fixed\",top:0,left:0,width:\"1px\",height:\"1px\",display:\"block\",backgroundColor:\"transparent\",zIndex:-1,cursor:\"default\",pointerEvents:\"none\",opacity:0,overflow:\"hidden\"};const motionVariants={hidden:{y:25,opacity:0,scale:.9,pointerEvents:\"none\"},visible:{y:0,opacity:1,scale:1,pointerEvents:\"auto\"}};const motionTransition={type:\"spring\",stiffness:300,damping:30,mass:.8};return /*#__PURE__*/_jsx(motion.div,{style:overlayStyle,onClick:shouldShowOverlay?dismissOverlay:undefined,animate:shouldShowOverlay?\"visible\":\"hidden\",variants:motionVariants,transition:motionTransition,initial:\"hidden\",children:shouldShowOverlay&&/*#__PURE__*/_jsx(motion.div,{onClick:e=>e.stopPropagation(),style:{cursor:\"default\",pointerEvents:\"auto\"},initial:{y:25,opacity:0,scale:.9},animate:{y:0,opacity:1,scale:1},transition:motionTransition,children:/*#__PURE__*/_jsx(Component,{...props})})});};}export function withDismissOverlay(Component){return function WrappedComponent(props){const[,setStore]=useStore();const dismissOverlay=React.useCallback(event=>{event.preventDefault();event.stopPropagation();setStore({isOverlayVisible:false});sessionStorage.setItem(\"overlayDismissed\",\"true\");},[setStore]);return /*#__PURE__*/_jsx(Component,{...props,onClick:dismissOverlay});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withDismissOverlay\":{\"type\":\"reactHoc\",\"name\":\"withDismissOverlay\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withWindowLeaveOverlay\":{\"type\":\"reactHoc\",\"name\":\"withWindowLeaveOverlay\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ExitIntent.map"],
  "mappings": "8HAAqF,SAASA,EAAYC,EAAO,CACjH,IAAMC,EAAUC,EAAK,CAAC,MAAM,OAAO,OAAO,CAAC,GAAGF,CAAM,CAAC,CAAC,CAAC,EACjDG,EAAaC,GAAU,CAC1B,OAAOA,GAAW,aAAYA,EAASA,EAASH,EAAU,KAAK,GAAGA,EAAU,MAAM,OAAO,OAAO,CA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,EAAa,QAAQD,EAAkBD,EAAe,OAAU,QAAQC,EAAkB,UAAU,SAAS,SAASE,EAAe,WAAWC,EAAiB,QAAQ,SAAS,SAASH,GAAgCI,EAAKC,EAAO,IAAI,CAAC,QAAQlB,GAAGA,EAAE,gBAAgB,EAAE,MAAM,CAAC,OAAO,UAAU,cAAc,MAAM,EAAE,QAAQ,CAAC,EAAE,GAAG,QAAQ,EAAE,MAAM,EAAE,EAAE,QAAQ,CAAC,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,WAAWgB,EAAiB,SAAsBC,EAAKvB,EAAU,CAAC,GAAGC,CAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,CAAE,CAAQ,SAASwB,EAAmBzB,EAAU,CAAC,OAAO,SAA0BC,EAAM,CAAC,GAAK,CAAC,CAACE,CAAQ,EAAEN,EAAS,EAAQqB,EAAeZ,EAAM,YAAYK,GAAO,CAACA,EAAM,eAAe,EAAEA,EAAM,gBAAgB,EAAER,EAAS,CAAC,iBAAiB,EAAK,CAAC,EAAE,eAAe,QAAQ,mBAAmB,MAAM,CAAE,EAAE,CAACA,CAAQ,CAAC,EAAE,OAAoBoB,EAAKvB,EAAU,CAAC,GAAGC,EAAM,QAAQiB,CAAc,CAAC,CAAE,CAAE",
  "names": ["createStore", "state1", "dataStore", "Data", "setDataStore", "newState", "storeState", "storeSetters", "setStoreState", "setter", "useStore", "state", "setState", "ye", "ue", "useObserveData", "useStore", "createStore", "withWindowLeaveOverlay", "Component", "props", "store", "setStore", "overlayDismissed", "setOverlayDismissed", "e", "isInitialized", "setIsInitialized", "dismissed", "handleMouseLeave", "event", "clientX", "clientY", "relatedTarget", "innerWidth", "innerHeight", "window", "dismissOverlay", "shouldShowOverlay", "overlayStyle", "motionVariants", "motionTransition", "p", "motion", "withDismissOverlay"]
}
