{"version":3,"file":"FormatPrice.CTvgAMQK.mjs","names":["fonts","css","className","get"],"sources":["https:/framerusercontent.com/modules/OJKXYlYgSAZMV5eJRDmX/ASZW5PMZY2ATLN7lpqYL/fNSPUnunt.js","https:/framerusercontent.com/modules/eW7aQBQ712EXL6Rwy9ad/nFPWMUjlKvBOSf00qTEe/TIzKiGcOB.js","https:/framerusercontent.com/modules/3Zle0vOgmVdmuJZ1NROp/eeUKQkCjiUZ1Hsj1oOgb/FormatPrice.js"],"sourcesContent":["import{fontStore}from\"framer\";fontStore.loadWebFontsFromSelectors([\"GF;Inter-regular\"]);export const fonts=[{family:\"Inter\",moduleAsset:{localModuleIdentifier:\"local-module:css/fNSPUnunt:default\",url:\"https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfMZhrib2Bg-4.ttf\"},style:\"normal\",url:\"https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfMZhrib2Bg-4.ttf\",weight:\"400\"}];export const css=['.framer-WNBqx .framer-styles-preset-kc49iy:not(.rich-text-wrapper), .framer-WNBqx .framer-styles-preset-kc49iy.rich-text-wrapper p { --framer-font-family: \"Inter\", \"Inter Placeholder\", sans-serif; --framer-font-size: 12px; --framer-font-style: normal; --framer-font-weight: 400; --framer-letter-spacing: -1em; --framer-line-height: 1%; --framer-paragraph-spacing: 1px; --framer-text-alignment: start; --framer-text-color: rgba(255, 255, 255, 0); --framer-text-decoration: none; --framer-text-transform: none; }'];export const className=\"framer-WNBqx\";\nexport const __FramerMetadata__ = {\"exports\":{\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// Generated by Framer (6d7081c)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"GF;Inter-500\"]);export const fonts=[{explicitInter:true,fonts:[{family:\"Inter\",source:\"google\",style:\"normal\",url:\"https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuI6fMZ1rib2Bg-4.woff2\",weight:\"500\"}]}];export const css=['.framer-L7uLx .framer-styles-preset-j385k6:not(.rich-text-wrapper), .framer-L7uLx .framer-styles-preset-j385k6.rich-text-wrapper p { --framer-font-family: \"Inter\", \"Inter Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 16px; --framer-font-style: normal; --framer-font-variation-axes: normal; --framer-font-weight: 500; --framer-letter-spacing: -0.03em; --framer-line-height: 100%; --framer-paragraph-spacing: 16px; --framer-text-alignment: left; --framer-text-color: #000000; --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }'];export const className=\"framer-L7uLx\";\nexport const __FramerMetadata__ = {\"exports\":{\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{get}from\"lodash-es\";export const formatPrice=(price,currencyCode,showCurrencyCode,currencyCodePosition,_currencySymbolConfig=get(window,\"shopXtools.configs.prices.currencySymbol\"))=>{if(!price)return\"\";const _currencySymbol=get(window,`__currencyMap.${currencyCode}`)||\"$\";const _hideDecimalsIfNotNecessary=get(window,\"shopXtools.configs.prices.hideDecimalsIfNotNecessary\");let formattedPrice=parseFloat(price).toLocaleString(\"en-US\",{minimumFractionDigits:_hideDecimalsIfNotNecessary?0:2,maximumFractionDigits:_hideDecimalsIfNotNecessary?2:2});if(_currencySymbolConfig===\"Right\"){formattedPrice=`${formattedPrice}${_currencySymbol}`;}else if(_currencySymbolConfig===\"Left\"){formattedPrice=`${_currencySymbol}${formattedPrice}`;}else if(_currencySymbolConfig===\"Hide\"){formattedPrice=`${formattedPrice}`;}if(showCurrencyCode){if(currencyCodePosition===\"Right\"){formattedPrice=`${formattedPrice} ${currencyCode}`;}if(currencyCodePosition===\"Left\"){formattedPrice=`${currencyCode} ${formattedPrice} `;}}return formattedPrice.trim();};export const formatPriceNoCurrencyCode=(price,currencyCode,_showCurrencyCode=false)=>{if(!price)return\"\";const _currencySymbolConfig=get(window,\"shopXtools.configs.prices.currencySymbol\");const _currencySymbol=get(window,`__currencyMap.${currencyCode}`)||\"$\";const _hideDecimalsIfNotNecessary=get(window,\"shopXtools.configs.prices.hideDecimalsIfNotNecessary\");let formattedPrice=parseFloat(price).toLocaleString(\"en-US\",{minimumFractionDigits:_hideDecimalsIfNotNecessary?0:2,maximumFractionDigits:_hideDecimalsIfNotNecessary?2:2});if(_currencySymbolConfig===\"Right\"){formattedPrice=`${formattedPrice}${_currencySymbol}`;}else if(_currencySymbolConfig===\"Left\"){formattedPrice=`${_currencySymbol}${formattedPrice}`;}else if(_currencySymbolConfig===\"Hide\"){formattedPrice=`${formattedPrice}`;}if(_showCurrencyCode){formattedPrice=`${currencyCode} ${formattedPrice}`;}// using trim() to remove extra spaces\nreturn formattedPrice.trim();};\nexport const __FramerMetadata__ = {\"exports\":{\"formatPriceNoCurrencyCode\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"formatPrice\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FormatPrice.map"],"mappings":"gTAA8B,GAAU,0BAA0B,CAAC,mBAAmB,CAAC,CAAcA,EAAM,CAAC,CAAC,OAAO,QAAQ,YAAY,CAAC,sBAAsB,qCAAqC,IAAI,wGAAwG,CAAC,MAAM,SAAS,IAAI,wGAAwG,OAAO,MAAM,CAAC,CAAcC,EAAI,CAAC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