{"version":3,"file":"UnlockTimer.4NJSf0a2.mjs","names":["useState","__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/B673L3xOBhZMPQA9glsw/5VsX0Re39OHchkvxk3ja/UnlockTimer.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";/** Hide layer fully until delay elapses, then fade in + enable clicks */function useDelayReveal(ms){const[ready,setReady]=useState(false);useEffect(()=>{const t=setTimeout(()=>setReady(true),ms);return()=>clearTimeout(t);},[ms]);if(!ready){return{visible:false,pointerEvents:\"none\",style:{visibility:\"hidden\",opacity:0}};}return{visible:true,pointerEvents:\"auto\",style:{visibility:\"visible\",opacity:1,transition:\"opacity 400ms ease\"}};}/** Plain-text countdown (does NOT auto-hide at 0; it just stops at 00:00) */function useCountdownPlain(msTotal){const[ms,setMs]=useState(msTotal);useEffect(()=>{const id=setInterval(()=>setMs(v=>Math.max(0,v-1e3)),1e3);return()=>clearInterval(id);},[msTotal]);const mm=String(Math.floor(ms/6e4)).padStart(2,\"0\");const ss=String(Math.floor(ms%6e4/1e3)).padStart(2,\"0\");return`השלב הבא ייפתח בעוד ${mm}:${ss}`;}/** BUTTON unlock delays (attach to the outer button wrapper) */export const delay30s=()=>useDelayReveal(3e4);export const delay60s=()=>useDelayReveal(6e4);export const delay120s=()=>useDelayReveal(12e4);export const delay5m=()=>useDelayReveal(5*6e4);export const delay10m=()=>useDelayReveal(10*6e4);export const delay15m=()=>useDelayReveal(15*6e4);/** PLAIN TEXT TIMERS (attach to a Text layer) */export const timer30s=()=>({text:useCountdownPlain(3e4),style:{direction:\"rtl\",textAlign:\"center\",fontWeight:700,letterSpacing:\"0.5px\"}});export const timer60s=()=>({text:useCountdownPlain(6e4),style:{direction:\"rtl\",textAlign:\"center\",fontWeight:700,letterSpacing:\"0.5px\"}});export const timer120s=()=>({text:useCountdownPlain(12e4),style:{direction:\"rtl\",textAlign:\"center\",fontWeight:700,letterSpacing:\"0.5px\"}});export const timer5m=()=>({text:useCountdownPlain(5*6e4),style:{direction:\"rtl\",textAlign:\"center\",fontWeight:700,letterSpacing:\"0.5px\"}});export const timer10m=()=>({text:useCountdownPlain(10*6e4),style:{direction:\"rtl\",textAlign:\"center\",fontWeight:700,letterSpacing:\"0.5px\"}});export const timer15m=()=>({text:useCountdownPlain(15*6e4),style:{direction:\"rtl\",textAlign:\"center\",fontWeight:700,letterSpacing:\"0.5px\"}});import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withdelay30s(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...delay30s(props)});};}withdelay30s.displayName=\"delay30s\";export function withdelay60s(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...delay60s(props)});};}withdelay60s.displayName=\"delay60s\";export function withdelay120s(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...delay120s(props)});};}withdelay120s.displayName=\"delay120s\";export function withdelay5m(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...delay5m(props)});};}withdelay5m.displayName=\"delay5m\";export function withdelay10m(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...delay10m(props)});};}withdelay10m.displayName=\"delay10m\";export function withdelay15m(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...delay15m(props)});};}withdelay15m.displayName=\"delay15m\";export function withtimer30s(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...timer30s(props)});};}withtimer30s.displayName=\"timer30s\";export function withtimer60s(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...timer60s(props)});};}withtimer60s.displayName=\"timer60s\";export function withtimer120s(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...timer120s(props)});};}withtimer120s.displayName=\"timer120s\";export function withtimer5m(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...timer5m(props)});};}withtimer5m.displayName=\"timer5m\";export function withtimer10m(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...timer10m(props)});};}withtimer10m.displayName=\"timer10m\";export function withtimer15m(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...timer15m(props)});};}withtimer15m.displayName=\"timer15m\";\nexport const __FramerMetadata__ = {\"exports\":{\"timer5m\":{\"type\":\"override\",\"name\":\"timer5m\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withtimer120s\":{\"type\":\"reactHoc\",\"name\":\"withtimer120s\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"delay15m\":{\"type\":\"override\",\"name\":\"delay15m\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"delay5m\":{\"type\":\"override\",\"name\":\"delay5m\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withtimer5m\":{\"type\":\"reactHoc\",\"name\":\"withtimer5m\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withtimer15m\":{\"type\":\"reactHoc\",\"name\":\"withtimer15m\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"delay10m\":{\"type\":\"override\",\"name\":\"delay10m\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withdelay10m\":{\"type\":\"reactHoc\",\"name\":\"withdelay10m\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withdelay15m\":{\"type\":\"reactHoc\",\"name\":\"withdelay15m\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"delay60s\":{\"type\":\"override\",\"name\":\"delay60s\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withdelay60s\":{\"type\":\"reactHoc\",\"name\":\"withdelay60s\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"timer30s\":{\"type\":\"override\",\"name\":\"timer30s\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withtimer10m\":{\"type\":\"reactHoc\",\"name\":\"withtimer10m\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"delay120s\":{\"type\":\"override\",\"name\":\"delay120s\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withdelay120s\":{\"type\":\"reactHoc\",\"name\":\"withdelay120s\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withdelay5m\":{\"type\":\"reactHoc\",\"name\":\"withdelay5m\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withdelay30s\":{\"type\":\"reactHoc\",\"name\":\"withdelay30s\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"timer60s\":{\"type\":\"override\",\"name\":\"timer60s\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withtimer30s\":{\"type\":\"reactHoc\",\"name\":\"withtimer30s\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"timer10m\":{\"type\":\"override\",\"name\":\"timer10m\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"timer120s\":{\"type\":\"override\",\"name\":\"timer120s\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withtimer60s\":{\"type\":\"reactHoc\",\"name\":\"withtimer60s\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"delay30s\":{\"type\":\"override\",\"name\":\"delay30s\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"timer15m\":{\"type\":\"override\",\"name\":\"timer15m\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./UnlockTimer.map"],"mappings":"4KAA0J,SAAS,EAAe,EAAG,CAAC,GAAK,CAAC,EAAM,GAAUA,EAAS,GAAM,CAAyL,OAAxL,MAA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