{"version":3,"file":"ApplicationStatsCounter.BUHGV_wX.mjs","names":["React.useRef","React.useState","React.useMemo","React.useCallback","__esmMin","pe","init_npm_react_18_3_1","ne","init_ssg_sandbox_shims","window","te","_e","p","c","init_jsx_runtime","ce","de","addPropertyControls","init_framer_BWFVvmND","useIsStaticRenderer","ControlType","ApplicationStatsCounter","props","containerRef","isStaticRenderer","hasEntered","setHasEntered","displayValues","setDisplayValues","targetValues","valueOne","valueTwo","valueThree","prefersReducedMotion","textAlign","alignment","getJustifyContent","node","observer","entry","entries","frame","start","totalDuration","duration","tick","time","elapsed","progress","eased","target","items","labelOne","labelTwo","labelThree","style","index","dividerColor","gap","numberColor","numberFont","item","labelColor","labelFont","init_ApplicationStatsCounter"],"sources":["https:/framerusercontent.com/modules/gRuszyOiXt0KkjKPrTAI/u8K6IqyJnFhwjOAkas3f/ApplicationStatsCounter.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";// User request: Create a new Framer code component named ApplicationStatsCounter for a dark editorial competition site with three animated counters, viewport-triggered start, reduced-motion support, responsive wrapping layout, dark-section-ready styling, configurable controls, semantic accessibility, and root style prop support.\n/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function ApplicationStatsCounter(props){const{valueOne,valueTwo,valueThree,labelOne,labelTwo,labelThree,duration,numberColor,labelColor,dividerColor,gap,alignment,numberFont,labelFont,style}=props;const containerRef=React.useRef(null);const isStaticRenderer=useIsStaticRenderer();const[hasEntered,setHasEntered]=React.useState(false);const[displayValues,setDisplayValues]=React.useState([0,0,0]);const targetValues=React.useMemo(()=>[valueOne,valueTwo,valueThree],[valueOne,valueTwo,valueThree]);const prefersReducedMotion=React.useMemo(()=>{if(typeof window===\"undefined\")return true;return window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;},[]);const textAlign=React.useMemo(()=>{return alignment;},[alignment]);const getJustifyContent=React.useCallback(()=>{if(alignment===\"left\")return\"flex-start\";if(alignment===\"right\")return\"flex-end\";return\"center\";},[alignment]);React.useEffect(()=>{if(typeof window===\"undefined\")return;if(typeof window.IntersectionObserver===\"undefined\"){React.startTransition(()=>setHasEntered(true));return;}const node=containerRef.current;if(!node)return;const observer=new IntersectionObserver(entries=>{const[entry]=entries;if(!entry)return;if(entry.isIntersecting){React.startTransition(()=>setHasEntered(true));observer.unobserve(entry.target);}},{threshold:.35});observer.observe(node);return()=>observer.disconnect();},[]);React.useEffect(()=>{if(!(prefersReducedMotion||isStaticRenderer))return;React.startTransition(()=>{setHasEntered(true);setDisplayValues(targetValues);});},[prefersReducedMotion,isStaticRenderer,targetValues]);React.useEffect(()=>{if(!hasEntered)return;if(prefersReducedMotion||isStaticRenderer){React.startTransition(()=>setDisplayValues(targetValues));return;}let frame=0;let start=0;const totalDuration=Math.max(.1,duration)*1e3;const tick=time=>{if(!start)start=time;const elapsed=time-start;const progress=Math.min(1,elapsed/totalDuration);const eased=1-Math.pow(1-progress,3);React.startTransition(()=>{setDisplayValues(targetValues.map(target=>Math.round(target*eased)));});if(progress<1){frame=window.requestAnimationFrame(tick);}};frame=window.requestAnimationFrame(tick);return()=>window.cancelAnimationFrame(frame);},[hasEntered,duration,targetValues,prefersReducedMotion,isStaticRenderer]);const items=React.useMemo(()=>[{value:displayValues[0]??0,label:labelOne},{value:displayValues[1]??0,label:labelTwo},{value:displayValues[2]??0,label:labelThree}],[displayValues,labelOne,labelTwo,labelThree]);return /*#__PURE__*/_jsx(\"section\",{ref:containerRef,\"aria-label\":\"Application statistics\",style:{position:\"relative\",width:\"100%\",minHeight:180,display:\"flex\",background:\"transparent\",...style},children:/*#__PURE__*/_jsx(\"ul\",{style:{listStyle:\"none\",margin:0,padding:0,width:\"100%\",display:\"flex\",flexWrap:\"wrap\",justifyContent:\"space-between\",alignItems:\"stretch\",gap:gap},children:items.map((item,index)=>/*#__PURE__*/_jsx(\"li\",{style:{flex:\"1 1 220px\",minWidth:180,display:\"flex\",justifyContent:getJustifyContent(),borderLeft:index===0?\"none\":`1px solid ${dividerColor}`,paddingLeft:index===0?0:gap*.5},children:/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:12,textAlign},children:[/*#__PURE__*/_jsx(\"span\",{style:{color:numberColor,fontFamily:'\"Odile\", serif',fontSize:numberFont.fontSize,lineHeight:numberFont.lineHeight,letterSpacing:numberFont.letterSpacing,fontWeight:numberFont.fontWeight,fontStyle:numberFont.fontStyle,textAlign:numberFont.textAlign??textAlign,whiteSpace:\"nowrap\"},children:item.value}),/*#__PURE__*/_jsx(\"span\",{style:{color:labelColor,fontFamily:'\"Odile\", serif',fontSize:labelFont.fontSize,lineHeight:labelFont.lineHeight,letterSpacing:labelFont.letterSpacing,fontWeight:labelFont.fontWeight,fontStyle:labelFont.fontStyle,textAlign:labelFont.textAlign??textAlign},children:item.label})]})},`${item.label}-${index}`))})});}addPropertyControls(ApplicationStatsCounter,{valueOne:{type:ControlType.Number,title:\"Value 1\",defaultValue:111,min:0,step:1},valueTwo:{type:ControlType.Number,title:\"Value 2\",defaultValue:45,min:0,step:1},valueThree:{type:ControlType.Number,title:\"Value 3\",defaultValue:21,min:0,step:1},labelOne:{type:ControlType.String,title:\"Label 1\",defaultValue:\"Teams\"},labelTwo:{type:ControlType.String,title:\"Label 2\",defaultValue:\"Institutions\"},labelThree:{type:ControlType.String,title:\"Label 3\",defaultValue:\"States and Union Territories\"},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:1.6,min:.1,max:8,step:.1,unit:\"s\"},numberColor:{type:ControlType.Color,title:\"Number\",defaultValue:\"#B7FF38\"},labelColor:{type:ControlType.Color,title:\"Label\",defaultValue:\"#F3EEDF\"},dividerColor:{type:ControlType.Color,title:\"Divider\",defaultValue:\"#B7FF38\"},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:40,min:8,max:120,step:2,unit:\"px\"},alignment:{type:ControlType.Enum,title:\"Align\",defaultValue:\"center\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"],displaySegmentedControl:true},numberFont:{type:ControlType.Font,title:\"Numbers Font\",defaultValue:{fontSize:\"88px\",variant:\"Semibold\",letterSpacing:\"-0.02em\",lineHeight:\"0.95em\",textAlign:\"center\"},controls:\"extended\",defaultFontType:\"sans-serif\"},labelFont:{type:ControlType.Font,title:\"Labels Font\",defaultValue:{fontSize:\"16px\",variant:\"Medium\",letterSpacing:\"0em\",lineHeight:\"1.2em\",textAlign:\"center\"},controls:\"extended\",defaultFontType:\"sans-serif\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ApplicationStatsCounter\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ApplicationStatsCounter.map"],"mappings":"A,0OAIG,SAAwBqB,EAAwB,EAAM,CAAC,GAAK,CAAC,WAAS,WAAS,aAAW,WAAS,WAAS,aAAW,WAAS,cAAY,aAAW,eAAa,MAAI,YAAU,aAAW,YAAU,SAAOC,EAAYC,EAAavB,EAAa,IAAI,EAAQwB,EAAiBL,EAAoB,EAAO,CAACM,EAAWC,GAAezB,EAAe,EAAK,EAAO,CAAC0B,EAAcC,GAAkB3B,EAAe,CAAC,EAAE,EAAE,CAAC,CAAC,EAAQ4B,EAAa3B,MAAkB,CAAC4B,EAASC,EAASC,CAAU,EAAE,CAACF,EAASC,EAASC,CAAU,CAAC,EAAQC,EAAqB/B,MAA6BO,IAAS,QAA+BA,EAAO,WAAW,kCAAkC,CAAC,CAAC,QAAU,CAAC,CAAC,EAAQyB,EAAUhC,MAA0BiC,EAAY,CAACA,CAAS,CAAC,EAAQC,EAAkBjC,MAA0BgC,IAAY,OAAa,aAAgBA,IAAY,QAAc,WA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