{"version":3,"file":"NumberFlow_Prod.CLh3neJK.mjs","names":["NumberFlow","useId"],"sources":["https:/framerusercontent.com/modules/DPwgyTlYyPqF8EltT6Wk/7V1eDDmIfgMJSy3hQjXS/NumberFlow_Prod.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{useId}from\"react\";import NumberFlow from\"https://framer.com/m/NumberFlowReact-yGat.js\";const TREND_VALUES={nearest:(oldValue,value)=>Math.sign(value-oldValue),individual:0,up:1,down:-1};const EASING_VALUES={smooth:`linear(0,.005,.019,.039,.066,.096,.129,.165,.202,.24,.278,.316,.354,.39,.426,.461,.494,.526,.557,.586,.614,.64,.665,.689,.711,.731,.751,.769,.786,.802,.817,.831,.844,.856,.867,.877,.887,.896,.904,.912,.919,.925,.931,.937,.942,.947,.951,.955,.959,.962,.965,.968,.971,.973,.976,.978,.98,.981,.983,.984,.986,.987,.988,.989,.99,.991,.992,.992,.993,.994,.994,.995,.995,.996,.996,.9963,.9967,.9969,.9972,.9975,.9977,.9979,.9981,.9982,.9984,.9985,.9987,.9988,.9989,1)`,linear:\"linear\",ease:\"ease\",easeIn:\"ease-in\",easeOut:\"ease-out\",easeInOut:\"ease-in-out\"};/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n *\n * @framerDisableUnlink\n */export default function NumberFlowComponent(props){const{value,format,gradientHeight}=props;const isCanvas=RenderTarget.current()===RenderTarget.canvas;const id=useInstanceId();const style={userSelect:props.userSelect?\"auto\":\"none\",fontVariantNumeric:props.monospace?\"tabular-nums\":undefined,margin:0,color:props.color,...props.font,...props.style};const numberFormat={notation:format.style===\"compact\"?\"compact\":\"standard\",signDisplay:format.plusSign?\"exceptZero\":\"auto\",useGrouping:format.separators};return isCanvas?/*#__PURE__*/_jsxs(\"div\",{style:{...props.style,...style,whiteSpace:\"pre\"},children:[props.prefix,Intl.NumberFormat(format.locale||undefined,numberFormat).format(value),props.suffix]}):/*#__PURE__*/_jsxs(\"div\",{id:id,style:{...props.style,whiteSpace:\"pre\",marginTop:-gradientHeight,marginBottom:-gradientHeight},children:[/*#__PURE__*/_jsx(NumberFlow,{value:value,trend:TREND_VALUES[props.direction],continuous:props.continuous,format:numberFormat,locales:format.locale||undefined,prefix:props.prefix,suffix:props.suffix,transformTiming:{easing:EASING_VALUES[props.transition.easing],duration:props.transition.duration*1e3},opacityTiming:{easing:\"ease-out\",duration:props.transition.duration*1e3/2},isolate:true,willChange:true,style:style}),/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:`#${id} { --number-flow-mask-height: ${gradientHeight}px }`}})]});}NumberFlowComponent.displayName=\"NumberFlow\";addPropertyControls(NumberFlowComponent,{value:{type:ControlType.Number,defaultValue:0},format:{type:ControlType.Object,controls:{style:{type:ControlType.Enum,defaultValue:\"default\",options:[\"default\",\"compact\"],optionTitles:[\"Default (1,000)\",\"Compact (1K)\"],displaySegmentedControl:true,segmentedControlDirection:\"vertical\"},separators:{type:ControlType.Boolean,defaultValue:true},plusSign:{type:ControlType.Boolean,defaultValue:false},locale:{type:ControlType.String,placeholder:`Auto${typeof navigator!==\"undefined\"?` (${navigator.language})`:\"\"}`}}},direction:{type:ControlType.Enum,defaultValue:\"nearest\",options:[\"nearest\",\"individual\",\"up\",\"down\"],optionTitles:[\"Nearest (All)\",\"Nearest (Per-Character)\",\"Up ↑\",\"Down ↓\"]},continuous:{type:ControlType.Boolean,defaultValue:true,hidden:props=>props.direction===\"individual\"},gradientHeight:{type:ControlType.Number,defaultValue:10,min:0,step:1,title:\"Gradient\"},font:{type:\"font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:16,lineHeight:1}},color:{type:ControlType.Color,defaultValue:\"#000\"},prefix:{type:ControlType.String,placeholder:\"Prefix\"},suffix:{type:ControlType.String,placeholder:\"Suffix\"},userSelect:{type:ControlType.Boolean,defaultValue:false},transition:{type:ControlType.Object,controls:{easing:{type:ControlType.Enum,defaultValue:\"smooth\",options:[\"smooth\",\"linear\",\"ease\",\"easeIn\",\"easeOut\",\"easeInOut\"],optionTitles:[\"Smooth\",\"Linear\",\"Ease\",\"Ease In\",\"Ease Out\",\"Ease In Out\"]},duration:{type:ControlType.Number,defaultValue:.75,min:0,step:.01}},description:\"More components at [Framer University](https://frameruni.link/cc).\"}});const useInstanceId=()=>{const id=useId();const cleanId=id.replace(/:/g,\"\");const instanceId=`frameruni-${cleanId}`;return instanceId;};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"NumberFlowComponent\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./NumberFlow_Prod.map"],"mappings":"sQAKG,SAAwB,EAAoB,EAAM,CAAC,GAAK,CAAC,QAAM,SAAO,kBAAgB,EAAY,EAAS,EAAa,SAAS,GAAG,EAAa,OAAa,EAAG,GAAe,CAAO,EAAM,CAAC,WAAW,EAAM,WAAW,OAAO,OAAO,mBAAmB,EAAM,UAAU,eAAe,IAAA,GAAU,OAAO,EAAE,MAAM,EAAM,MAAM,GAAG,EAAM,KAAK,GAAG,EAAM,MAAM,CAAO,EAAa,CAAC,SAAS,EAAO,QAAQ,UAAU,UAAU,WAAW,YAAY,EAAO,SAAS,aAAa,OAAO,YAAY,EAAO,WAAW,CAAC,OAAO,EAAsB,EAAM,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,MAAM,GAAG,EAAM,WAAW,MAAM,CAAC,SAAS,CAAC,EAAM,OAAO,KAAK,aAAa,EAAO,QAAQ,IAAA,GAAU,EAAa,CAAC,OAAO,EAAM,CAAC,EAAM,OAAO,CAAC,CAAC,CAAc,EAAM,MAAM,CAAI,KAAG,MAAM,CAAC,GAAG,EAAM,MAAM,WAAW,MAAM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