{"version":3,"file":"ProductionTimecode.DLoxT91T.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/WupK5slmcLREOCB7ZsAV/0nhjVmpgBmtPxAaqkUbq/G9ZL7sybI.js","https:/framerusercontent.com/modules/gSY6A9W1KT6mwkZQ0AjQ/zFO543JVSsfyqdvwZeT6/ProductionTimecode.js"],"sourcesContent":["// Generated by Framer (4f63079)\nimport{fontStore}from\"framer\";fontStore.loadFonts([]);export const fonts=[{explicitInter:true,fonts:[]}];export const css=[\".framer-4CF6H .framer-styles-preset-enyhi1:not(.rich-text-wrapper), .framer-4CF6H .framer-styles-preset-enyhi1.rich-text-wrapper a { --framer-link-current-text-color: rgba(244, 245, 242, 0.85); --framer-link-hover-text-color: #0099ff; --framer-link-text-color: rgba(244, 245, 242, 0.85); --framer-link-text-decoration: none; transition-delay: 0s; transition-duration: 0.3s; transition-property: color; transition-timing-function: cubic-bezier(0.42, 0, 0.58, 1); }\"];export const className=\"framer-4CF6H\";\nexport const __FramerMetadata__ = {\"exports\":{\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{useEffect,useState}from\"react\";/**\n * ProductionTimecode — scroll-scrubbed film timecode (HH:MM:SS:FF).\n * Maps page scroll progress onto a fixed \"runtime\" at a given frame rate,\n * so the whole site reads as a feature with a running clock.\n * Static 00:00:00:00 on the Framer canvas; animates in preview/live.\n * Respects prefers-reduced-motion (stays at 00:00:00:00).\n */export default function ProductionTimecode(props){const{runtimeMinutes,fps,color,fontSize}=props;const[tc,setTc]=useState(\"00:00:00:00\");useEffect(()=>{if(RenderTarget.current()===RenderTarget.canvas)return;if(typeof window!==\"undefined\"&&window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches)return;const totalFrames=runtimeMinutes*60*fps;const pad=n=>String(n).padStart(2,\"0\");let raf=0;let last=\"\";const update=()=>{const max=document.documentElement.scrollHeight-window.innerHeight;const sp=Math.min(1,Math.max(0,window.scrollY/Math.max(1,max)));const f=Math.round(sp*totalFrames);const next=`${pad(Math.floor(f/(fps*3600)))}:${pad(Math.floor(f/(fps*60))%60)}:${pad(Math.floor(f/fps)%60)}:${pad(f%fps)}`;if(next!==last){last=next;setTc(next);}};const onScroll=()=>{cancelAnimationFrame(raf);raf=requestAnimationFrame(update);};update();window.addEventListener(\"scroll\",onScroll,{passive:true});window.addEventListener(\"resize\",onScroll);return()=>{cancelAnimationFrame(raf);window.removeEventListener(\"scroll\",onScroll);window.removeEventListener(\"resize\",onScroll);};},[runtimeMinutes,fps]);return /*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{fontFamily:\"'Space Mono', monospace\",fontSize,letterSpacing:\"0.1em\",color,fontVariantNumeric:\"tabular-nums\",whiteSpace:\"nowrap\"},children:tc});}ProductionTimecode.defaultProps={runtimeMinutes:132,fps:24,color:\"#F4F5F2\",fontSize:12};addPropertyControls(ProductionTimecode,{runtimeMinutes:{type:ControlType.Number,title:\"Runtime (min)\",defaultValue:132,min:1,max:600,step:1},fps:{type:ControlType.Number,title:\"FPS\",defaultValue:24,min:12,max:60,step:1},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#F4F5F2\"},fontSize:{type:ControlType.Number,title:\"Size\",defaultValue:12,min:8,max:24,step:1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProductionTimecode\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProductionTimecode.map"],"mappings":"8NAC6B,EAAC,EAAU,UAAU,CAAC,CAAC,EAAe,EAAM,CAAC,CAAC,cAAc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