{"version":3,"file":"Utils.BM-HLPIL.mjs","names":[],"sources":["https:/framerusercontent.com/modules/pImxelvy6iA22OBzkUsA/LMIu8hDuP0jybZHjWGDM/Utils.js"],"sourcesContent":["/**\n * Utility functions for Framer overrides\n */import{cloneElement,isValidElement}from\"react\";// ===== Input Parsing =====\n/**\n * Parse a string input to a number, with options to strip formatting.\n * Note: Does NOT auto-divide percentages - caller is responsible for that.\n */export function parseNumericInput(value,options={}){const{stripCurrency=false,stripPercent=false,stripCommas=true}=options;let cleaned=value?.trim()||\"\";if(stripCurrency){cleaned=cleaned.replace(/^\\$/,\"\");}if(stripCommas){cleaned=cleaned.replace(/,/g,\"\");}if(stripPercent){cleaned=cleaned.replace(/%$/,\"\");}return parseFloat(cleaned);}// ===== Formatting =====\nexport function formatCurrency(value){return`$${Math.round(value).toLocaleString()}`;}export function formatNumber(value){return Math.round(value).toLocaleString();}// ===== Children Replacement =====\nexport function replaceSingleValue(children,placeholder,newValue){if(typeof children===\"string\"){return children.split(placeholder).join(newValue);}if(typeof children===\"number\"){return children.toString()===placeholder?newValue:children;}if(/*#__PURE__*/isValidElement(children)){const childProps=children.props;if(childProps?.children!==undefined){return /*#__PURE__*/cloneElement(children,{...childProps,children:replaceSingleValue(childProps.children,placeholder,newValue)});}return children;}if(Array.isArray(children)){return children.map(child=>replaceSingleValue(child,placeholder,newValue));}return children;}/**\n * Replace multiple placeholder strings in children\n *\n * @example\n * replaceValuesInChildren(children, {\n *   \"{FUEL_COST}\": \"$1,234,567\",\n *   \"{NET}\": \"$85,000\",\n * })\n */export function replaceValuesInChildren(children,replacements){let result=children;for(const[placeholder,value]of Object.entries(replacements)){result=replaceSingleValue(result,placeholder,value);}return result;}/**\n * MCP COMPATIBILITY FOOTER. DO NOT MODIFY.\n * FEROX SYSTEMS 2025\n *\n * The Framer MCP can only see files that export an override. This dummy\n * override makes this file visible and editable to the MCP.\n *\n * Does nothing; just returns the component unchanged.\n * @framerDisableUnlink\n */export function withMcp(Component){return Component;}\nexport const __FramerMetadata__ = {\"exports\":{\"formatCurrency\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"formatNumber\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMcp\":{\"type\":\"reactHoc\",\"name\":\"withMcp\",\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"replaceSingleValue\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"replaceValuesInChildren\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"parseNumericInput\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Utils.map"],"mappings":"2GAMG,SAAgB,EAAkB,EAAM,EAAQ,EAAE,CAAC,CAAC,GAAK,CAAC,gBAAc,GAAM,eAAa,GAAM,cAAY,IAAM,EAAY,EAAQ,GAAO,MAAM,EAAE,GAA6J,OAAvJ,IAAe,EAAQ,EAAQ,QAAQ,MAAM,GAAG,EAAK,IAAa,EAAQ,EAAQ,QAAQ,KAAK,GAAG,EAAK,IAAc,EAAQ,EAAQ,QAAQ,KAAK,GAAG,EAAS,WAAW,EAAQ,CAChV,SAAgB,EAAe,EAAM,CAAC,MAAM,IAAI,KAAK,MAAM,EAAM,CAAC,gBAAgB,GAAI,SAAgB,EAAa,EAAM,CAAC,OAAO,KAAK,MAAM,EAAM,CAAC,gBAAgB,CACnK,SAAgB,EAAmB,EAAS,EAAY,EAAS,CAAC,GAAG,OAAO,GAAW,SAAU,OAAO,EAAS,MAAM,EAAY,CAAC,KAAK,EAAS,CAAE,GAAG,OAAO,GAAW,SAAU,OAAO,EAAS,UAAU,GAAG,EAAY,EAAS,EAAU,GAAgB,EAAe,EAAS,CAAC,CAAC,IAAM,EAAW,EAAS,MAA6K,OAApK,GAAY,WAAW,IAAA,GAAoJ,EAArH,EAAa,EAAS,CAAC,GAAG,EAAW,SAAS,EAAmB,EAAW,SAAS,EAAY,EAAS,CAAC,CAAC,CAA2H,OAArG,MAAM,QAAQ,EAAS,CAAS,EAAS,IAAI,GAAO,EAAmB,EAAM,EAAY,EAAS,CAAC,CAAS,EAQ7lB,SAAgB,EAAwB,EAAS,EAAa,CAAC,IAAI,EAAO,EAAS,IAAI,GAAK,CAAC,EAAY,KAAS,OAAO,QAAQ,EAAa,CAAE,EAAO,EAAmB,EAAO,EAAY,EAAM,CAAE,OAAO,mBAd7J"}