{"version":3,"file":"BlockScrollLoader.BADEOWs0.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/qVe2xRO4D9YIkKVB4PVC/Tfw29w8Jj8Rz2MVKzDWc/BlockScrollLoader.js"],"sourcesContent":["// Transparent BlockScrollLoader component for Framer\n// Blocks scroll with fade effect and optional timer. Use inside pre-loading overlays.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * BlockScrollLoader\n *\n * Transparent overlay that blocks scroll with optional fade and timer. Use inside pre-loading overlays.\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function BlockScrollLoader(props){const{block,duration,fade,style}=props;const[visible,setVisible]=useState(block);useEffect(()=>{if(typeof window===\"undefined\")return;const html=typeof document!==\"undefined\"?document.documentElement:null;if(block){document.body.style.overflow=\"hidden\";if(html)html.style.overflow=\"hidden\";setVisible(true);// Prevent scroll events\nconst prevent=e=>{e.preventDefault();};window.addEventListener(\"wheel\",prevent,{passive:false});window.addEventListener(\"touchmove\",prevent,{passive:false});if(duration>0){const t=setTimeout(()=>{startTransition(()=>setVisible(false));document.body.style.overflow=\"\";if(html)html.style.overflow=\"\";window.removeEventListener(\"wheel\",prevent);window.removeEventListener(\"touchmove\",prevent);},duration);return()=>{clearTimeout(t);document.body.style.overflow=\"\";if(html)html.style.overflow=\"\";window.removeEventListener(\"wheel\",prevent);window.removeEventListener(\"touchmove\",prevent);};}return()=>{document.body.style.overflow=\"\";if(html)html.style.overflow=\"\";window.removeEventListener(\"wheel\",prevent);window.removeEventListener(\"touchmove\",prevent);};}else{document.body.style.overflow=\"\";if(html)html.style.overflow=\"\";setVisible(false);}return()=>{document.body.style.overflow=\"\";if(html)html.style.overflow=\"\";};},[block,duration]);if(!visible||RenderTarget.current()===RenderTarget.thumbnail)return null;return /*#__PURE__*/_jsx(\"div\",{style:{...style,position:\"fixed\",top:0,left:0,width:\"100vw\",height:\"100vh\",background:\"transparent\",zIndex:9999,pointerEvents:\"all\",opacity:fade?.7:1,transition:fade?\"opacity 0.3s cubic-bezier(.4,0,.2,1)\":undefined,touchAction:\"none\",overscrollBehavior:\"none\"},\"aria-hidden\":\"true\"});}addPropertyControls(BlockScrollLoader,{block:{type:ControlType.Boolean,title:\"Block Scroll\",defaultValue:true,enabledTitle:\"Block\",disabledTitle:\"Allow\"},duration:{type:ControlType.Number,title:\"Timer (ms)\",defaultValue:0,min:0,max:1e4,step:100,unit:\"ms\"},fade:{type:ControlType.Boolean,title:\"Fade Effect\",defaultValue:true,enabledTitle:\"Fade\",disabledTitle:\"None\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BlockScrollLoader\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BlockScrollLoader.map"],"mappings":"6MASG,SAAwB,EAAkB,EAAM,CAAC,GAAK,CAAC,QAAM,WAAS,OAAK,SAAO,EAAW,CAAC,EAAQ,GAAYA,EAAS,EAAM,CACg3B,OAD/2B,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,EAAK,OAAO,SAAW,IAAY,SAAS,gBAAgB,KAAK,GAAG,EAAM,CAAC,SAAS,KAAK,MAAM,SAAS,SAAY,IAAK,EAAK,MAAM,SAAS,UAAS,EAAW,GAAK,CACtW,IAAM,EAAQ,GAAG,CAAC,EAAE,gBAAgB,EAAyH,GAAtH,EAAO,iBAAiB,QAAQ,EAAQ,CAAC,QAAQ,GAAM,CAAC,CAAC,EAAO,iBAAiB,YAAY,EAAQ,CAAC,QAAQ,GAAM,CAAC,CAAI,EAAS,EAAE,CAAC,IAAM,EAAE,eAAe,CAAC,MAAoB,EAAW,GAAM,CAAC,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