{"version":3,"file":"utmParams.CXfCtu07.mjs","names":["useState","useRef","useCallback","throttle"],"sources":["https:/framerusercontent.com/modules/4gxKhYDXhQYsHYSbypZW/CwQMBB6veGtRJ77hGsnc/FC_CartCounter.js","https:/framerusercontent.com/modules/vC6fzbfO83MgBPIhn5zl/DUlbmWuOELzEUenVmv3G/locales.js","https:/framerusercontent.com/modules/6Zs9CjkPbKzHjoy8LK08/iqoIwmJw4hztafi4V4IV/Fb_pixel.js","https:/framerusercontent.com/modules/w24ELWa2giT3SFaWpV77/398w6fPyag8B92ojouQr/utmParams.js"],"sourcesContent":["/*\n * Framer Commerce\n * Confidential and Proprietary - All Rights Reserved\n * Unauthorized use, reproduction, distribution, or disclosure of this\n * source code or any related information is strictly prohibited.\n *\n * This software is the exclusive property of Framer Commerce (\"Company\").\n * It is considered highly confidential and proprietary information.\n *\n * Any use, copying, modification, distribution, or sharing of this software,\n * in whole or in part, without the express written permission of the Company\n * is strictly prohibited and may result in legal action.\n *\n * DISCLAIMER: This software does not provide any express or\n * implied warranties, including, but not limited to, the implied warranties\n * of merchantability and fitness for a particular purpose. In no event shall\n * Framer Commerce be liable for any direct, indirect, incidental, special,\n * exemplary, or consequential damages (including, but not limited to, procurement\n * of substitute goods or services; loss of use, data, or profits; or business\n * interruption) however caused and on any theory of liability, whether in\n * contract, strict liability, or tort (including negligence or otherwise)\n * arising in any way out of the use of this software, even if advised of\n * the possibility of such damage.\n *\n * Any unauthorized possession, use, copying, distribution, or dissemination\n * of this software will be considered a breach of confidentiality and may\n * result in legal action.\n *\n * For inquiries, contact:\n * Framer Commerce\n * Email: hello@framercommerce.com\n *\n * © 2025 Butter Supply Inc. All Rights Reserved.\n */import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState,useCallback}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{throttle}from\"lodash-es\";/**\n * @framerDisableUnlink\n */export default function FC_CartCounter(props){if(RenderTarget.current()===RenderTarget.canvas){// Always show in canvas (shows placeholder \"0\")\nreturn /*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",width:\"100%\",height:\"100%\"},children:/*#__PURE__*/_jsx(\"p\",{style:{...props.font,color:props.color,backgroundColor:props.backgroundColor,...props.border,borderRadius:props.radius,padding:props.padding,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",margin:0,width:\"100%\",height:props.fixedHeight?`${props.heightPx}px`:\"100%\",lineHeight:1,fontSize:props.font?.fontSize||\"inherit\"},children:\"0\"})});}else{const[isBrowser,setIsBrowser]=useState(false);const[cartItemCount,setCartItemCount]=useState(0);const[isLoading,setIsLoading]=useState(true);const[isVisible,setIsVisible]=useState(false);const isFetching=useRef(false);const initialLoadDone=useRef(false);// Set isBrowser to true once component mounts\nuseEffect(()=>{setIsBrowser(true);},[]);// Helper function to wait until a condition is true\nconst waitForCondition=useCallback((conditionFn,checkInterval=100,timeout=1e4)=>{return new Promise((resolve,reject)=>{const startTime=Date.now();const checkCondition=()=>{if(conditionFn()){resolve();}else if(Date.now()-startTime>=timeout){reject(new Error(\"Condition not met within timeout\"));}else{setTimeout(checkCondition,checkInterval);}};checkCondition();});},[]);const fetchCartAndUpdateCount=useCallback(async cartId=>{if(isFetching.current){return;}isFetching.current=true;// Only set loading state on initial load\nif(!initialLoadDone.current){setIsLoading(true);setIsVisible(false);}try{await waitForCondition(()=>window.shopXtools&&window.shopXtools.fetchCart);const cartData=await window.shopXtools.fetchCart(cartId);if(cartData&&cartData.lines&&cartData.lines.edges&&cartData.lines.edges.length>0){const itemCount=cartData.lines.edges.reduce((total,edge)=>total+(edge.node.quantity||0),0);setCartItemCount(itemCount);}else{setCartItemCount(0);// Show immediately if no items\nsetIsLoading(false);setIsVisible(true);initialLoadDone.current=true;}}catch(error){setCartItemCount(0);// Show immediately if error\nsetIsLoading(false);setIsVisible(true);initialLoadDone.current=true;}finally{isFetching.current=false;// Only handle visibility on initial load with items\nif(!initialLoadDone.current){setIsLoading(false);initialLoadDone.current=true;// Add a small delay before showing the counter for smoother transition\nsetTimeout(()=>setIsVisible(true),50);}}},[waitForCondition]);const handleCartUpdate=useCallback(throttle(async()=>{if(!isBrowser)return;// Don't run on server-side\nlet cartId=window[\"shopXtools\"]?.cart?.id;if(!cartId){try{cartId=localStorage.getItem(\"shopX_cart_id\");}catch(error){// Error accessing localStorage\n}}if(cartId){await fetchCartAndUpdateCount(cartId);}else{setCartItemCount(0);// Show immediately if no cart\nsetIsLoading(false);setIsVisible(true);initialLoadDone.current=true;}},1e3),[fetchCartAndUpdateCount,isBrowser]);useEffect(()=>{if(!isBrowser)return;// Don't run on server-side\nwindow.addEventListener(\"shopXtools-cart-update\",handleCartUpdate);handleCartUpdate();return()=>{window.removeEventListener(\"shopXtools-cart-update\",handleCartUpdate);};},[handleCartUpdate,isBrowser]);if(props.hideIf0&&cartItemCount===0){return null;}return /*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",width:\"100%\",height:\"100%\"},children:/*#__PURE__*/_jsx(\"p\",{style:{...props.font,color:props.color,backgroundColor:props.backgroundColor,...props.border,borderRadius:props.radius,padding:props.padding,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",margin:0,width:\"100%\",height:props.fixedHeight?`${props.heightPx}px`:\"100%\",opacity:isVisible?1:0,transition:\"opacity 0.3s ease-in-out\",visibility:isLoading?\"hidden\":\"visible\",lineHeight:1,fontSize:props.font?.fontSize||\"inherit\"},children:isBrowser?cartItemCount.toString():\"0\"})});}}FC_CartCounter.defaultProps={hideIf0:false,font:undefined,color:\"#000\",backgroundColor:\"#FFFFFF00\",backgroundOpacity:0,border:{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0,borderLeftWidth:0,borderStyle:\"solid\",borderColor:\"rgba(0, 0, 0, 0.5)\"},radius:0,padding:0,fixedHeight:false,heightPx:40};addPropertyControls(FC_CartCounter,{hideIf0:{type:ControlType.Boolean,title:\"When 0\",defaultValue:false,enabledTitle:\"Hide\",disabledTitle:\"Show\",description:\"For browser only, canvas will always display 0.\"},font:{type:ControlType.Font,controls:\"extended\",title:\"Font\"},color:{type:ControlType.Color,defaultValue:\"#000\",title:\"Color\"},backgroundColor:{type:ControlType.Color,title:\"BG\",defaultValue:\"rgba(255, 255, 255, 0)\"},border:{type:ControlType.Border,title:\"Border\",defaultValue:{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0,borderLeftWidth:0,borderStyle:\"solid\",borderColor:\"rgba(0, 0, 0, 0.5)\"}},/*     fixedHeight: {\n        type: ControlType.Boolean,\n        title: \"Height\",\n        defaultValue: false,\n        enabledTitle: \"Fixed\",\n        disabledTitle: \"Fit\",\n    },\n    heightPx: {\n        type: ControlType.Number,\n        title: \"Height\",\n        defaultValue: 40,\n        min: 0,\n        hidden: ({ fixedHeight }) => !fixedHeight,\n    }, */padding:{type:ControlType.FusedNumber,title:\"Padding\",defaultValue:0,toggleKey:\"paddingPerSide\",toggleTitles:[\"All\",\"Sides\"],valueKeys:[\"paddingTop\",\"paddingRight\",\"paddingBottom\",\"paddingLeft\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0},radius:{type:ControlType.FusedNumber,title:\"Radius\",defaultValue:0,toggleKey:\"radiusPerCorner\",toggleTitles:[\"All\",\"Corners\"],valueKeys:[\"topLeft\",\"topRight\",\"bottomRight\",\"bottomLeft\"],valueLabels:[\"TL\",\"TR\",\"BR\",\"BL\"],min:0}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FC_CartCounter\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FC_CartCounter.map","export const getCurrentLanguage=()=>{if(typeof window===\"undefined\")return\"en\";// First check URL path for language\nconst pathname=window.location.pathname;const pathSegments=pathname.split(\"/\").filter(Boolean);const validLanguages=[// Basic language codes\n\"ar\",\"bg\",\"bn\",\"cs\",\"da\",\"de\",\"el\",\"en\",\"es\",\"fi\",\"fr\",\"he\",\"hi\",\"hr\",\"hu\",\"id\",\"it\",\"ja\",\"ko\",\"lt\",\"ms\",\"nb\",\"nl\",\"pl\",\"ro\",\"ru\",\"sk\",\"sl\",\"sr\",\"sv\",\"ta\",\"th\",\"tr\",\"uk\",\"vi\",// Region-specific language codes\n\"pt-BR\",\"pt-PT\",\"zh-CN\",\"zh-TW\"];// Helper function to normalize language codes\nconst normalizeLanguageCode=code=>{const lowerCode=code.toLowerCase();// Special handling for region-specific codes\nif(lowerCode===\"pt\"||lowerCode.startsWith(\"pt-\")){// Default Portuguese to Brazilian Portuguese if no specific region\nif(lowerCode.length===2)return\"pt-BR\";// Preserve uppercase region codes for Portuguese\nconst region=code.substring(3).toUpperCase();return`pt-${region}`;}if(lowerCode===\"zh\"||lowerCode.startsWith(\"zh-\")){// Default Chinese to Simplified Chinese if no specific region\nif(lowerCode.length===2)return\"zh-CN\";// Preserve uppercase region codes for Chinese\nconst region=code.substring(3).toUpperCase();return`zh-${region}`;}// For basic language codes, return lowercase\nreturn lowerCode;};// Check if the first path segment is a valid language code\nif(pathSegments[0]){const normalizedCode=normalizeLanguageCode(pathSegments[0]);if(validLanguages.includes(normalizedCode)){return normalizedCode;}}// Then check sessionStorage for checkoutLocale\nconst sessionStorageLocale=sessionStorage.getItem(\"checkoutLocale\");if(sessionStorageLocale){const normalizedLocale=normalizeLanguageCode(sessionStorageLocale);if(validLanguages.includes(normalizedLocale)){return normalizedLocale;}}// Then check localStorage for checkoutLocale\nconst localStorageLocale=localStorage.getItem(\"checkoutLocale\");if(localStorageLocale){const normalizedLocale=normalizeLanguageCode(localStorageLocale);if(validLanguages.includes(normalizedLocale)){return normalizedLocale;}}// Then check if we have a default language set in the window config\nif(window.__FcCheckoutConfigs?.locale){const configLocale=normalizeLanguageCode(window.__FcCheckoutConfigs.locale);if(validLanguages.includes(configLocale)){return configLocale;}}return\"en\";};export const appendLanguageToUrl=url=>{if(!url)return url;try{const urlObj=new URL(url);const currentLang=getCurrentLanguage();urlObj.searchParams.delete(\"locale\");urlObj.searchParams.append(\"locale\",currentLang);return urlObj.toString();}catch(error){console.error(\"Error in appendLanguageToUrl:\",error);return url;}};// Helper function to map country code to appropriate locale\nexport const getLocaleFromCountry=countryCode=>{// Default fallback locale\nif(!countryCode)return undefined;// Common country code to locale mappings\nconst countryToLocale={// North America\nUS:\"en-US\",CA:\"en-CA\",QC:\"fr-CA\",// Europe\nGB:\"en-GB\",FR:\"fr-FR\",DE:\"de-DE\",IT:\"it-IT\",ES:\"es-ES\",PT:\"pt-PT\",NL:\"nl-NL\",BE:\"fr-BE\",LU:\"fr-LU\",CH:\"de-CH\",AT:\"de-AT\",SE:\"sv-SE\",NO:\"nb-NO\",DK:\"da-DK\",FI:\"fi-FI\",PL:\"pl-PL\",CZ:\"cs-CZ\",HU:\"hu-HU\",RU:\"ru-RU\",// Asia Pacific\nCN:\"zh-CN\",JP:\"ja-JP\",KR:\"ko-KR\",IN:\"en-IN\",AU:\"en-AU\",NZ:\"en-NZ\",// Latin America\nMX:\"es-MX\",BR:\"pt-BR\",AR:\"es-AR\",CL:\"es-CL\",CO:\"es-CO\",PE:\"es-PE\",// Middle East & Africa\nAE:\"ar-AE\",SA:\"ar-SA\",ZA:\"en-ZA\",IL:\"he-IL\"};return countryToLocale[countryCode]||undefined;};\nexport const __FramerMetadata__ = {\"exports\":{\"getCurrentLanguage\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getLocaleFromCountry\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"appendLanguageToUrl\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./locales.map","/*\n * Framer Commerce\n * Confidential and Proprietary - All Rights Reserved\n */// Utility function to clean Shopify GID to just the numeric ID\nconst cleanShopifyId=gid=>gid?.split(\"/\").pop()||\"\";/**\n * Check if marketing consent is granted\n * Uses the global FCConsentManager if available\n */const checkMarketingConsent=()=>{if(typeof window!==\"undefined\"&&window.FCConsentManager){const consent=window.FCConsentManager.getConsent();// Check marketing consent from the consent manager\nreturn consent.marketing===true;}// No FCConsentManager = allow tracking (Framer's approach)\n// Pass the GDPR compliance decision to the project owner\nreturn true;};// Standardized Facebook Pixel AddToCart tracking function\nexport const trackFacebookPixelAddToCart=data=>{// Check consent before tracking\nif(!checkMarketingConsent()){// Silently skip tracking - no consent\nreturn;}if(typeof fbq!==\"function\"){console.warn(\"Facebook Pixel not available\");return;}const{variant,product,quantity=1,currency=\"USD\"}=data;if(!variant||!product){console.warn(\"Missing variant or product data for Facebook Pixel tracking\");return;}const item_id=cleanShopifyId(variant.id);const item_name=product.title||\"\";const item_variant=variant.title||\"\";const price=parseFloat(variant.price?.amount||\"0\");const value=price*quantity;const finalCurrency=variant.price?.currencyCode||currency;// Validate required data\nif(!item_id||!item_name||price<=0){console.warn(\"❌ Skipping Facebook Pixel AddToCart: missing required data\",{item_id,item_name,price,value});return;}const fbqData={content_type:\"product\",content_ids:[item_id],content_name:item_name,content_category:product.productType||\"\",content_brand:product.vendor||\"\",value:parseFloat(value.toFixed(2)),currency:finalCurrency,contents:[{id:item_id,price:parseFloat(price.toFixed(2)),quantity:parseInt(quantity.toString())}]};// console.log('[Facebook Pixel] Firing AddToCart', item_id, item_name);\n// console.log('[Facebook Pixel] AddToCart with data:', fbqData);\n// console.log('[Facebook Pixel] AddToCart timestamp:', new Date().toISOString());\nfbq(\"track\",\"AddToCart\",fbqData,{eventID:\"addtocart_\"+Date.now()});};// Standardized Facebook Pixel InitiateCheckout tracking function\nexport const trackFacebookPixelInitiateCheckout=data=>{// Check consent before tracking\nif(!checkMarketingConsent()){// Silently skip tracking - no consent\nreturn;}if(typeof fbq!==\"function\"){console.warn(\"Facebook Pixel not available\");return;}const{variant,product,quantity=1,currency=\"USD\",value:providedValue,content_ids:providedContentIds,content_name:providedContentName,num_items:providedNumItems}=data;let fbqData={content_type:\"product\",currency:currency};// If we have variant and product data, calculate from them\nif(variant&&product){const item_id=cleanShopifyId(variant.id);const item_name=product.title||\"\";const price=parseFloat(variant.price?.amount||\"0\");const calculatedValue=price*quantity;const finalCurrency=variant.price?.currencyCode||currency;// Validate required data\nif(!item_id||!item_name||price<=0){console.warn(\"❌ Skipping Facebook Pixel InitiateCheckout: missing required data\",{item_id,item_name,price,calculatedValue});return;}fbqData={content_type:\"product\",content_ids:[item_id],content_name:item_name,content_category:product.productType||\"\",content_brand:product.vendor||\"\",value:parseFloat(calculatedValue.toFixed(2)),currency:finalCurrency,num_items:parseInt(quantity.toString())};}else if(providedContentIds&&providedValue!==undefined){// Ensure providedValue is a valid number\nconst numericValue=typeof providedValue===\"number\"?providedValue:parseFloat(providedValue)||0;fbqData={content_type:\"product\",content_ids:providedContentIds,content_name:providedContentName||\"Checkout\",value:parseFloat(numericValue.toFixed(2)),currency:currency,num_items:parseInt((providedNumItems||1).toString())};}else{console.warn(\"❌ Skipping Facebook Pixel InitiateCheckout: insufficient data\",data);return;}// console.log('[Facebook Pixel] Firing InitiateCheckout', fbqData.content_ids?.[0], fbqData.content_name);\n// console.log('[Facebook Pixel] InitiateCheckout with data:', fbqData);\n// console.log('[Facebook Pixel] InitiateCheckout timestamp:', new Date().toISOString());\n// Use sendBeacon if requested, otherwise use regular tracking\nconst eventOptions={eventID:\"initiatecheckout_\"+Date.now()};if(data.useBeacon){fbq(\"track\",\"InitiateCheckout\",fbqData,{...eventOptions,transport:\"beacon\"});}else{fbq(\"track\",\"InitiateCheckout\",fbqData,eventOptions);}};// Standardized Facebook Pixel RemoveFromCart tracking function\nexport const trackFacebookPixelRemoveFromCart=data=>{// Check consent before tracking\nif(!checkMarketingConsent()){// Silently skip tracking - no consent\nreturn;}if(typeof fbq!==\"function\"){console.warn(\"Facebook Pixel not available\");return;}const{lineItem,currency=\"USD\"}=data;if(!lineItem){console.warn(\"Missing lineItem data for Facebook Pixel RemoveFromCart tracking\");return;}const item_id=cleanShopifyId(lineItem.merchandise.id);const item_name=lineItem.merchandise.product?.title||\"\";const item_variant=lineItem.merchandise.title||\"\";const price=parseFloat(lineItem.cost.subtotalAmount.amount||\"0\");const quantity=lineItem.quantity||1;const value=price*quantity;const finalCurrency=lineItem.cost.subtotalAmount.currencyCode||currency;// Validate required data\nif(!item_id||!item_name||price<=0){console.warn(\"❌ Skipping Facebook Pixel RemoveFromCart: missing required data\",{item_id,item_name,price,value,quantity});return;}const fbqData={content_type:\"product\",content_ids:[item_id],content_name:item_name,content_category:lineItem.merchandise.product?.productType||\"\",content_brand:lineItem.merchandise.product?.vendor||\"\",value:parseFloat(value.toFixed(2)),currency:finalCurrency,contents:[{id:item_id,price:parseFloat(price.toFixed(2)),quantity:parseInt(quantity.toString())}]};// console.log('[Facebook Pixel] Firing RemoveFromCart with data:', fbqData);\nfbq(\"track\",\"RemoveFromCart\",fbqData,{eventID:\"removefromcart_\"+Date.now()});};// Standardized Facebook Pixel ViewContent tracking function\nexport const trackFacebookPixelViewContent=data=>{// Check consent before tracking\nif(!checkMarketingConsent()){// Silently skip tracking - no consent\nreturn;}if(typeof fbq!==\"function\"){console.warn(\"Facebook Pixel not available\");return;}const{variant,product,currency=\"USD\"}=data;if(!product){console.warn(\"Missing product data for Facebook Pixel ViewContent tracking\");return;}const item_id=variant?cleanShopifyId(variant.id):cleanShopifyId(product.id);const item_name=product.title||\"\";const item_variant=variant?.title||\"\";const price=variant?parseFloat(variant.price?.amount||\"0\"):parseFloat(product.priceRange?.minVariantPrice?.amount||\"0\");const finalCurrency=variant?.price?.currencyCode||product.priceRange?.minVariantPrice?.currencyCode||currency;// Validate required data\nif(!item_id||!item_name||price<=0){console.warn(\"❌ Skipping Facebook Pixel ViewContent: missing required data\",{item_id,item_name,price});return;}const fbqData={content_type:\"product\",content_ids:[item_id],content_name:item_name,content_category:product.productType||\"\",content_brand:product.vendor||\"\",value:parseFloat(price.toFixed(2)),currency:finalCurrency};// console.log('[Facebook Pixel] Firing ViewContent with data:', fbqData);\nfbq(\"track\",\"ViewContent\",fbqData,{eventID:\"viewcontent_\"+Date.now()});};export default function initializeFacebookPixel(facebookPixelId){!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments);};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version=\"2.0\";n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;// Add onload and onerror event handlers\nt.onload=()=>{if(typeof fbq!==\"undefined\"){fbq(\"init\",facebookPixelId);fbq(\"track\",\"PageView\");}else{// Handle case where fbq is not defined\n}};t.onerror=()=>{// Handle Facebook Pixel script load failure\n};s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s);}(window,document,\"script\",\"https://connect.facebook.net/en_US/fbevents.js\");}\nexport const __FramerMetadata__ = {\"exports\":{\"trackFacebookPixelRemoveFromCart\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"trackFacebookPixelAddToCart\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"trackFacebookPixelViewContent\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"trackFacebookPixelInitiateCheckout\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Fb_pixel.map","// Declare the utmParams property on the global window object\n// Cookie utility functions\nfunction setCookie(name,value,days=30){const date=new Date;date.setTime(date.getTime()+days*24*60*60*1e3);const expires=`expires=${date.toUTCString()}`;// Remove SameSite=Lax and add secure flag if on HTTPS\nconst secure=window.location.protocol===\"https:\"?\";secure\":\"\";document.cookie=`${name}=${value};${expires};path=/${secure}`;}function getCookie(name){const nameEQ=`${name}=`;const ca=document.cookie.split(\";\");for(let i=0;i<ca.length;i++){let c=ca[i];while(c.charAt(0)===\" \")c=c.substring(1);if(c.indexOf(nameEQ)===0)return c.substring(nameEQ.length,c.length);}return null;}function deleteCookie(name){setCookie(name,\"\",-1);}export function getUTMParameters(){const urlParams=new URLSearchParams(window.location.search);const utmParams={};const utmKeys=[\"utm_source\",\"utm_medium\",\"utm_campaign\",\"utm_term\",\"utm_content\"];utmKeys.forEach(key=>{const value=urlParams.get(key);if(value){utmParams[key]=value;}});// Store UTM params in cookies if we have any\nif(Object.keys(utmParams).length>0){try{// Store each UTM parameter as a separate cookie\nObject.entries(utmParams).forEach(([key,value])=>{setCookie(key,value);});// Also store as a single JSON object for Shopify\nsetCookie(\"_shopify_utm\",JSON.stringify(utmParams));window.utmParams=utmParams;}catch(error){console.error(\"Error storing UTM parameters:\",error);}}return utmParams;}export function getSCARefParameters(){const urlParams=new URLSearchParams(window.location.search);const scaRefParams={};const scaRefKeys=[\"sca_ref\",\"sca_source\",\"sca_medium\",\"sca_campaign\",\"sca_term\",\"sca_content\"];scaRefKeys.forEach(key=>{const value=urlParams.get(key);if(value){scaRefParams[key]=value;}});// Store SCA ref params in cookies if we have any\nif(Object.keys(scaRefParams).length>0){try{// Store each SCA ref parameter as a separate cookie\nObject.entries(scaRefParams).forEach(([key,value])=>{setCookie(key,value);});// Also store as a single JSON object for Shopify\nsetCookie(\"_shopify_sca_ref\",JSON.stringify(scaRefParams));window.scaRefParams=scaRefParams;}catch(error){console.error(\"Error storing SCA ref parameters:\",error);}}return scaRefParams;}export function getStoredUTMParameters(){// First try to get from window object (for current session)\nif(window.utmParams&&Object.keys(window.utmParams).length>0){return window.utmParams;}// Then try to get from cookies\ntry{// First try to get from Shopify's format\nconst shopifyUtm=getCookie(\"_shopify_utm\");if(shopifyUtm){try{const parsedParams=JSON.parse(shopifyUtm);window.utmParams=parsedParams;return parsedParams;}catch(e){console.error(\"Error parsing Shopify UTM params:\",e);}}// Fallback to individual cookies\nconst utmParams={};const utmKeys=[\"utm_source\",\"utm_medium\",\"utm_campaign\",\"utm_term\",\"utm_content\"];utmKeys.forEach(key=>{const value=getCookie(key);if(value){utmParams[key]=value;}});if(Object.keys(utmParams).length>0){// Also set on window for easy access\nwindow.utmParams=utmParams;return utmParams;}}catch(error){console.error(\"Error retrieving stored UTM parameters:\",error);}return{};}export function getStoredSCARefParameters(){// First try to get from window object (for current session)\nif(window.scaRefParams&&Object.keys(window.scaRefParams).length>0){return window.scaRefParams;}// Then try to get from cookies\ntry{// First try to get from Shopify's format\nconst shopifyScaRef=getCookie(\"_shopify_sca_ref\");if(shopifyScaRef){try{const parsedParams=JSON.parse(shopifyScaRef);window.scaRefParams=parsedParams;return parsedParams;}catch(e){console.error(\"Error parsing Shopify SCA ref params:\",e);}}// Fallback to individual cookies\nconst scaRefParams={};const scaRefKeys=[\"sca_ref\",\"sca_source\",\"sca_medium\",\"sca_campaign\",\"sca_term\",\"sca_content\"];scaRefKeys.forEach(key=>{const value=getCookie(key);if(value){scaRefParams[key]=value;}});if(Object.keys(scaRefParams).length>0){// Also set on window for easy access\nwindow.scaRefParams=scaRefParams;return scaRefParams;}}catch(error){console.error(\"Error retrieving stored SCA ref parameters:\",error);}return{};}export function appendUTMParamsToUrl(checkoutUrl){if(!checkoutUrl)return checkoutUrl;// Get UTM params from cookies instead of current URL\nconst utmParams=getStoredUTMParameters();// If no stored UTM params, check current URL as fallback\nif(Object.keys(utmParams).length===0){getUTMParameters()// This will store them if present\n;}// Get the (potentially) updated UTM params\nconst finalUtmParams=getStoredUTMParameters();if(Object.keys(finalUtmParams).length>0){try{const url=new URL(checkoutUrl);// Add UTM parameters to the URL\nObject.keys(finalUtmParams).forEach(key=>{// Only append if the parameter doesn't already exist in the URL\nif(!url.searchParams.has(key)){url.searchParams.append(key,finalUtmParams[key]);}});const finalUrl=url.toString();return finalUrl;}catch(error){console.error(\"Error appending UTM params to URL:\",error);return checkoutUrl;}}return checkoutUrl;}export function appendSCARefParamsToUrl(checkoutUrl){if(!checkoutUrl)return checkoutUrl;// Get SCA ref params from cookies instead of current URL\nconst scaRefParams=getStoredSCARefParameters();// If no stored SCA ref params, check current URL as fallback\nif(Object.keys(scaRefParams).length===0){getSCARefParameters()// This will store them if present\n;}// Get the (potentially) updated SCA ref params\nconst finalScaRefParams=getStoredSCARefParameters();if(Object.keys(finalScaRefParams).length>0){try{const url=new URL(checkoutUrl);// Add SCA ref parameters to the URL\nObject.keys(finalScaRefParams).forEach(key=>{// Only append if the parameter doesn't already exist in the URL\nif(!url.searchParams.has(key)){url.searchParams.append(key,finalScaRefParams[key]);}});const finalUrl=url.toString();return finalUrl;}catch(error){console.error(\"Error appending SCA ref params to URL:\",error);return checkoutUrl;}}return checkoutUrl;}/**\n * Validate discount code format\n * Allows alphanumeric characters, hyphens, and underscores\n * Maximum length: 50 characters\n */function validateDiscountCode(code){if(!code||typeof code!==\"string\")return false;// Check length (max 50 characters)\nif(code.length>50)return false;// Check character set: alphanumeric, hyphens, underscores\nconst validPattern=/^[a-zA-Z0-9_-]+$/;return validPattern.test(code);}/**\n * Get discount code from URL and store in session storage\n */export function getDiscountCode(){if(typeof window===\"undefined\"||typeof sessionStorage===\"undefined\"){return null;}try{const urlParams=new URLSearchParams(window.location.search);const discountCode=urlParams.get(\"discount\");if(discountCode){// Validate the discount code\nif(validateDiscountCode(discountCode)){// Store in session storage\nsessionStorage.setItem(\"fc_discount_code\",discountCode);return discountCode;}else{console.warn(\"Invalid discount code format. Only alphanumeric characters, hyphens, and underscores are allowed. Max length: 50 characters.\");return null;}}return null;}catch(error){console.error(\"Error parsing discount code from URL:\",error);return null;}}/**\n * Get stored discount code from session storage\n */export function getStoredDiscountCode(){if(typeof window===\"undefined\"||typeof sessionStorage===\"undefined\"){return null;}try{const storedCode=sessionStorage.getItem(\"fc_discount_code\");// Validate stored code before returning\nif(storedCode&&validateDiscountCode(storedCode)){return storedCode;}// If invalid, remove it\nif(storedCode){sessionStorage.removeItem(\"fc_discount_code\");}return null;}catch(error){console.error(\"Error retrieving stored discount code:\",error);return null;}}/**\n * Append discount code to checkout URL\n */export function appendDiscountCodeToUrl(checkoutUrl){if(!checkoutUrl)return checkoutUrl;const discountCode=getStoredDiscountCode();if(discountCode){try{const url=new URL(checkoutUrl);// Only append if the discount parameter doesn't already exist in the URL\nif(!url.searchParams.has(\"discount\")){url.searchParams.append(\"discount\",discountCode);}const finalUrl=url.toString();return finalUrl;}catch(error){console.error(\"Error appending discount code to URL:\",error);return checkoutUrl;}}return checkoutUrl;}export function appendAllTrackingParamsToUrl(checkoutUrl){if(!checkoutUrl)return checkoutUrl;let finalUrl=checkoutUrl;// Append UTM parameters\nfinalUrl=appendUTMParamsToUrl(finalUrl);// Append SCA ref parameters\nfinalUrl=appendSCARefParamsToUrl(finalUrl);// Append discount code\nfinalUrl=appendDiscountCodeToUrl(finalUrl);return finalUrl;}// Initialize UTM and SCA ref parameters tracking when this module loads\nif(typeof window!==\"undefined\"){// Add a listener for when the DOM is fully loaded\nif(document.readyState===\"complete\"){getUTMParameters()// Document already loaded, capture UTMs now\n;getSCARefParameters()// Document already loaded, capture SCA refs now\n;getDiscountCode()// Document already loaded, capture discount code now\n;}else{window.addEventListener(\"load\",()=>{getUTMParameters();getSCARefParameters();getDiscountCode();});}}\nexport const __FramerMetadata__ = {\"exports\":{\"getSCARefParameters\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getDiscountCode\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"appendDiscountCodeToUrl\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getStoredUTMParameters\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"appendSCARefParamsToUrl\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getUTMParameters\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getStoredSCARefParameters\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"appendUTMParamsToUrl\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"appendAllTrackingParamsToUrl\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getStoredDiscountCode\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./utmParams.map"],"mappings":"yQAmCG,SAAwB,EAAe,EAAM,CAAC,GAAG,EAAa,SAAS,GAAG,EAAa,OAC1F,OAAoB,EAAK,MAAM,CAAC,MAAM,CAAC,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,MAAM,OAAO,OAAO,OAAO,CAAC,SAAsB,EAAK,IAAI,CAAC,MAAM,CAAC,GAAG,EAAM,KAAK,MAAM,EAAM,MAAM,gBAAgB,EAAM,gBAAgB,GAAG,EAAM,OAAO,aAAa,EAAM,OAAO,QAAQ,EAAM,QAAQ,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,OAAO,EAAE,MAAM,OAAO,OAAO,EAAM,YAAY,GAAG,EAAM,SAAS,IAAI,OAAO,WAAW,EAAE,SAAS,EAAM,MAAM,UAAU,UAAU,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC,CAAM,CAAC,GAAK,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAM,CAAC,EAAc,GAAkBA,EAAS,EAAE,CAAM,CAAC,EAAU,GAAcA,EAAS,GAAK,CAAM,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAO,EAAWC,EAAO,GAAM,CAAO,EAAgBA,EAAO,GAAM,CAC7vB,MAAc,CAAC,EAAa,GAAK,EAAG,EAAE,CAAC,CACvC,IAAM,EAAiBC,GAAa,EAAY,EAAc,IAAI,EAAQ,MAAc,IAAI,SAAS,EAAQ,IAAS,CAAC,IAAM,EAAU,KAAK,KAAK,CAAO,MAAmB,CAAI,GAAa,CAAE,GAAS,CAAU,KAAK,KAAK,CAAC,GAAW,EAAS,EAAW,MA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