{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/xjCJ7gWOYlQ6qEdFVZfb/mKnXz9VBIkfuKgK4xClm/PricingShared.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{CURRENCY_SYMBOLS}from\"https://framerusercontent.com/modules/bX8uKZ7IzjpMXigJZKQi/IPs2vMp6iqSI2uyTeWae/PricingContextNew.js\";import{countries}from\"https://framerusercontent.com/modules/atHU1bcxIWgxfBYCn3Zi/y4frR2PJXw4fm9fqjGHp/Shared.js\";import{addPropertyControls,ControlType}from\"framer\";export function RateDisplay({rate,currencyCode,zeroValue}){const currSymbol=CURRENCY_SYMBOLS[currencyCode]||currencyCode;return /*#__PURE__*/_jsx(\"span\",{children:rate===\"0\"&&zeroValue!=null?zeroValue:`${currSymbol}${rate}`});}export function Country({country,color,fontSize,lineHeight,fontWeight}){var _countries_country;var _countries_country_englishName;const countryName=(_countries_country_englishName=(_countries_country=countries[country])===null||_countries_country===void 0?void 0:_countries_country.englishName)!==null&&_countries_country_englishName!==void 0?_countries_country_englishName:country;return /*#__PURE__*/_jsx(\"span\",{style:{color,fontSize:`${fontSize}px`,lineHeight,fontWeight},children:countryName});}addPropertyControls(Country,{color:{type:ControlType.Color,defaultValue:\"#000000\"},fontSize:{type:ControlType.Number,defaultValue:18,min:8,max:48,unit:\"px\",step:1,displayStepper:true},lineHeight:{type:ControlType.Number,defaultValue:1.6,min:1,max:2,step:.1,displayStepper:true},fontWeight:{type:ControlType.Enum,defaultValue:400,options:[400,500,600,700],optionTitles:[\"Normal\",\"Medium\",\"Semi Bold\",\"Bold\"]}});export function getHighestInfTierRate(dimensions){// Convert string values to numbers and find the maximum.\nconst numbers=dimensions.map(d=>Number(d.infiniteTier.stringRate));return Math.max(...numbers);}/**\n * Helper function to  by dimension value\n */export function recordByDimension(dimensions){return Object.fromEntries(dimensions.map(d=>[d.dimension,d]));}export function filterDimensionsByCondition(dimensions,conditions){return dimensions.filter(d=>{const matches=conditions.every(c=>{if(c.key===\"unit\"){return d.pricingRule.unit===c.value;}return d.pricingRule.conditions.some(d=>d.key===c.key&&d.value===c.value);});return matches;});}export function groupDimensions(dimensions,groupByKey){return dimensions.reduce((acc,d)=>{const groupValue=getGroupValue(groupByKey,d.pricingRule);if(groupValue){if(!acc[groupValue]){acc[groupValue]=[];}acc[groupValue].push(d);}return acc;},{});}function getGroupValue(key,rule){var _rule_conditions_find,_rule_conditions;if(key===\"unit\"){return rule.unit;}if(key===\"countryCode\"){return rule.countryCode;}return(_rule_conditions=rule.conditions)===null||_rule_conditions===void 0?void 0:(_rule_conditions_find=_rule_conditions.find(c=>c.key===key))===null||_rule_conditions_find===void 0?void 0:_rule_conditions_find.value;}export function useMergedQueryData(queries,slugs){return slugs.reduce((q,slug)=>{const{data=[],isLoading}=queries[slug]||{};return{isLoading:q.isLoading||isLoading,data:[...q.data,...data]};},{isLoading:false,data:[]});}export function currencyCodeToSymbol(currencyCode,locale=\"en-US\"){try{const formatter=new Intl.NumberFormat(locale,{style:\"currency\",currency:currencyCode,minimumFractionDigits:0,maximumFractionDigits:0});const formatted=formatter.format(0);const symbol=formatted.replace(/\\d/g,\"\").trim()// Remove all digits and trim spaces\n;return symbol;}catch(e){return currencyCode;}}export function countDecimalPlaces(number){const decimalIndex=number.toString().indexOf(\".\");return decimalIndex>=0?number.toString().length-decimalIndex-1:0;}\nexport const __FramerMetadata__ = {\"exports\":{\"filterDimensionsByCondition\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"countDecimalPlaces\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useMergedQueryData\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"RateDisplay\":{\"type\":\"reactComponent\",\"name\":\"RateDisplay\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"Country\":{\"type\":\"reactComponent\",\"name\":\"Country\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"StyledText\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"PricingComponentBaseProps\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"groupDimensions\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"PricingRule\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getHighestInfTierRate\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Dimension\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Rule\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"currencyCodeToSymbol\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"RateDisplayProps\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"recordByDimension\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Tier\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],
  "mappings": "oNAAAA,IAA0V,SAASC,EAAY,CAAC,KAAAC,EAAK,aAAAC,EAAa,UAAAC,CAAS,EAAE,CAAC,IAAMC,EAAWC,EAAiBH,CAAY,GAAGA,EAAa,OAAoBI,EAAK,OAAO,CAAC,SAASL,IAAO,KAAKE,GAAW,KAAKA,EAAU,GAAGC,IAAaH,GAAM,CAAC,CAAE,CAAQ,SAASM,EAAQ,CAAC,QAAAC,EAAQ,MAAAC,EAAM,SAAAC,EAAS,WAAAC,EAAW,WAAAC,CAAU,EAAE,CAAC,IAAIC,EAAuBC,EAA+B,IAAMC,GAAaD,GAAgCD,EAAmBG,EAAUR,CAAO,KAAK,MAAMK,IAAqB,OAAO,OAAOA,EAAmB,eAAe,MAAMC,IAAiC,OAAOA,EAA+BN,EAAQ,OAAoBF,EAAK,OAAO,CAAC,MAAM,CAAC,MAAAG,EAAM,SAAS,G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C,EAAK,KAASD,IAAM,cAAsBC,EAAK,aAAoBE,EAAiBF,EAAK,cAAc,MAAME,IAAmB,SAAeD,EAAsBC,EAAiB,KAAKT,GAAGA,EAAE,MAAMM,CAAG,KAAK,MAAME,IAAwB,OAArG,OAAmHA,EAAsB,KAAM,CAAQ,SAASE,EAAmBC,EAAQC,EAAM,CAAC,OAAOA,EAAM,OAAO,CAACC,EAAEC,IAAO,CAAC,GAAK,CAAC,KAAAC,EAAK,CAAC,EAAE,UAAAC,CAAS,EAAEL,EAAQG,CAAI,GAAG,CAAC,EAAE,MAAM,CAAC,UAAUD,EAAE,WAAWG,EAAU,KAAK,CAAC,GAAGH,EAAE,KAAK,GAAGE,CAAI,CAAC,CAAE,EAAE,CAAC,UAAU,GAAM,KAAK,CAAC,CAAC,CAAC,CAAE,CAAQ,SAASE,EAAqBC,EAAaC,EAAO,QAAQ,CAAC,GAAG,CAC5xC,OAD6yC,IAAI,KAAK,aAAaA,EAAO,CAAC,MAAM,WAAW,SAASD,EAAa,sBAAsB,EAAE,sBAAsB,CAAC,CAAC,EAA4B,OAAO,CAAC,EAAyB,QAAQ,MAAM,EAAE,EAAE,KAAK,CACx+C,MAAC,CAAS,OAAOA,CAAa,CAAC,CAAQ,SAASE,EAAmBC,EAAO,CAAC,IAAMC,EAAaD,EAAO,SAAS,EAAE,QAAQ,GAAG,EAAE,OAAOC,GAAc,EAAED,EAAO,SAAS,EAAE,OAAOC,EAAa,EAAE,CAAE",
  "names": ["init_shims", "RateDisplay", "rate", "currencyCode", "zeroValue", "currSymbol", "CURRENCY_SYMBOLS", "p", "Country", "country", "color", "fontSize", "lineHeight", "fontWeight", "_countries_country", "_countries_country_englishName", "countryName", "countries", "addPropertyControls", "ControlType", "getHighestInfTierRate", "dimensions", "numbers", "d", "filterDimensionsByCondition", "dimensions", "conditions", "d", "c", "groupDimensions", "groupByKey", "acc", "groupValue", "getGroupValue", "key", "rule", "_rule_conditions_find", "_rule_conditions", "useMergedQueryData", "queries", "slugs", "q", "slug", "data", "isLoading", "currencyCodeToSymbol", "currencyCode", "locale", "countDecimalPlaces", "number", "decimalIndex"]
}
