{"version":3,"file":"Loading.Di7PiNPI.mjs","names":["useState","useRef","useCallback","get","countryCode","product","required","useState","useCallback","get","useState","get","useMemo","useRef","React.useCallback"],"sources":["https:/framerusercontent.com/modules/w24ELWa2giT3SFaWpV77/624RTOU53ckt7NzZkGeH/utmParams.js","https:/framerusercontent.com/modules/DfixsupJND2Hhr1xcPbk/6MM9Wuv0pSfEixZe7rhf/FC_ProductPurchaseButton.js","https:/framerusercontent.com/modules/B12xzzGu5tV27jDrWyaW/dyGmYzzIUDiXU0ubHYzE/FC_ProductVariantState.js","https:/framerusercontent.com/modules/N07JJZfuMtyHijtiRRgH/vuWsYB4j3wQ8nbJ1MmZM/FC_ProductPrice.js","https:/framerusercontent.com/modules/NQ9LlTfXzHTRhTTi6qMI/5u9VoSaQM7qxLI2scUcH/Loading.js"],"sourcesContent":["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;}});if(Object.keys(utmParams).length>0){window.utmParams=utmParams;}}export function appendUTMParamsToUrl(checkoutUrl){const utmParams=window.utmParams||{};if(Object.keys(utmParams).length>0){const url=new URL(checkoutUrl);Object.keys(utmParams).forEach(key=>{url.searchParams.append(key,utmParams[key]);});return url.toString();}return checkoutUrl;}\nexport const __FramerMetadata__ = {\"exports\":{\"appendUTMParamsToUrl\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getUTMParameters\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./utmParams.map","/*\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,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState,useRef,useCallback,cloneElement}from\"react\";import{createCartMutation,addToCartMutation,cartQuery,updateCartAttributes,updateCartCurrency}from\"https://framerusercontent.com/modules/yiRfl1JCGhIBUL31WVDk/wupS2XmBAHu1kBQNv9pi/mutations_v2.js\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{get}from\"lodash-es\";import{appendUTMParamsToUrl}from\"https://framerusercontent.com/modules/w24ELWa2giT3SFaWpV77/624RTOU53ckt7NzZkGeH/utmParams.js\";import{appendLanguageToUrl}from\"https://framerusercontent.com/modules/vC6fzbfO83MgBPIhn5zl/N2GIWD1ik8HES3ASBGeD/locales.js\";import{useIsBrowser}from\"https://framerusercontent.com/modules/ncBs5KPMI9I5GEta13fn/zGXDjuZapa1SGy6D8P5e/IsBrowser.js\";/**\n * @framerDisableUnlink\n */export default function FC_ProductPurchaseButton(props){const{shopifyProductID,available,OutOfStock,SelectVariant,LoadingState,shopifyProductVariantId,BuyNowATC,title=\"Add to Cart\",required=false,openCart=true}=props;// State from original component\nconst[product,setProduct]=useState();const[activeVariant,setActiveVariant]=useState();const[isInStock,setIsInStock]=useState(true);const[needsVariantSelection,setNeedsVariantSelection]=useState(false);const[isLoading,setIsLoading]=useState(true);const[shouldShowLoading,setShouldShowLoading]=useState(false);const[hasInitialized,setHasInitialized]=useState(false);const[countryCode,setCountryCode]=useState();const isBrowser=useIsBrowser();// Additional state for cart functionality\nconst[planSelected,setPlanSelected]=useState(\"one-time\");const[cartExistingData,setCartExistingData]=useState();const[errorMessage,setErrorMessage]=useState();const[productQuantity,setProductQuantity]=useState(1);const viewContentFired=useRef(false);const[autoSelectFirst,setAutoSelectFirst]=useState(false);const[autoSelectReceived,setAutoSelectReceived]=useState(false);const[isVariantManuallySelected,setIsVariantManuallySelected]=useState(false);// Check if variant is autoselected by default\nuseEffect(()=>{if(!isBrowser)return;//console.log(\"FC_ProductPurchaseButton mounted\")\nconst handleAutoSelectFlag=event=>{// console.log(\n//     \"Auto Select event received as:\",\n//     event.detail.autoSelectFirst\n// )\nsetAutoSelectFirst(event.detail.autoSelectFirst);// console.log(\"Auto Select First Flag:\", event.detail.autoSelectFirst)\nsetAutoSelectReceived(true);// console.log(\"Auto Select First Flag Received\")\n};document.addEventListener(\"auto_select_first_flag\",handleAutoSelectFlag);return()=>{document.removeEventListener(\"auto_select_first_flag\",handleAutoSelectFlag);};},[isBrowser]);// Calculate total inventory helper function\nconst calculateTotalInventory=useCallback(productData=>{if(!productData||productData===\"404\")return 0;// If totalInventory is available, use it\nif(typeof productData.totalInventory===\"number\"){return productData.totalInventory;}// Otherwise sum up variant quantities\nreturn get(productData,\"variants.edges\",[]).reduce((total,{node})=>{return total+(node.quantityAvailable||0);},0);},[]);// Helper function to check if variant is available for sale\nconst isVariantAvailable=useCallback(variant=>{if(!variant)return false;// If availableForSale is true, the variant can be sold regardless of quantity\nif(variant.availableForSale)return true;// If availableForSale is false, check quantity\nreturn variant.quantityAvailable>0;},[]);// Error handling\nuseEffect(()=>{if(errorMessage&&isBrowser){const event=new CustomEvent(\"errorChanged\",{detail:errorMessage});window.dispatchEvent(event);}},[errorMessage]);// Load cart from localStorage\nuseEffect(()=>{if(!isBrowser||!window[\"shopXtools\"])return;// Try to load cart ID first\nconst savedCartId=localStorage.getItem(\"shopX_cart_id\");if(savedCartId){// If we have a cart ID, fetch the cart data\nwindow.shopXtools.handleCartMutation(cartQuery,{cartId:savedCartId}).then(data=>{if(data?.cart){setCartExistingData(data.cart);window.shopXtools.cart=data.cart;localStorage.setItem(\"shopXtools.cart\",JSON.stringify(data.cart));}}).catch(error=>{// Clear invalid cart data\nlocalStorage.removeItem(\"shopX_cart_id\");localStorage.removeItem(\"shopXtools.cart\");});}const handleSubscriptionChange=event=>{setPlanSelected(event.detail.subscriptionId);};document.addEventListener(\"subscription__selection-sync\",handleSubscriptionChange);return()=>document.removeEventListener(\"subscription__selection-sync\",handleSubscriptionChange);},[isBrowser]);// Add this at the top level with other event handlers\nconst handleQuantityChange=event=>{setProductQuantity(event.detail);};useEffect(()=>{if(isBrowser){window.addEventListener(\"FcQuantitySelectorchanges\",handleQuantityChange);// Track view content\nif(typeof fbq!==\"undefined\"&&!viewContentFired.current){fbq(\"track\",\"ViewContent\");viewContentFired.current=true;}// Cleanup\nreturn()=>{window.removeEventListener(\"FcQuantitySelectorchanges\",handleQuantityChange);};}},[isBrowser]);useEffect(()=>{if(!isBrowser)return;const handleCurrencyChange=async event=>{const{countryCode}=event.detail;setCountryCode(countryCode);const existingCartId=localStorage.getItem(\"shopX_cart_id\");if(existingCartId){try{const updateData=await window.shopXtools.handleCartMutation(updateCartCurrency,{cartId:existingCartId,countryCode:countryCode});if(updateData?.cartBuyerIdentityUpdate?.cart){window.shopXtools.cart=updateData.cartBuyerIdentityUpdate.cart;window.dispatchEvent(new Event(\"shopXtools-cart-update\"));}else{window.dispatchEvent(new CustomEvent(\"errorChanged\",{detail:\"Failed to update cart with new country code\"}));}}catch(error){window.dispatchEvent(new CustomEvent(\"errorChanged\",{detail:error.message||\"Failed to update cart currency\"}));}}};window.addEventListener(\"currency_changed\",handleCurrencyChange);return()=>{window.removeEventListener(\"currency_changed\",handleCurrencyChange);};},[isBrowser]);// Load product data and set up event listeners\nuseEffect(()=>{if(!isBrowser)return;const handleSingleVariantProduct=productNode=>{if(!productNode)return false;const variants=get(productNode,\"variants.edges\",[]);if(variants.length===1){const variant=variants[0].node;setActiveVariant(variant);setIsInStock(isVariantAvailable(variant));setNeedsVariantSelection(false);return true;}return false;};const handleProductData=_matchingProduct=>{if(_matchingProduct){const productNode=_matchingProduct.node;setProduct(productNode||\"404\");// If shopifyProductVariantId is provided, find and set that variant\nif(shopifyProductVariantId&&productNode){const variantId=`gid://shopify/ProductVariant/${shopifyProductVariantId}`;const matchingVariant=get(productNode,\"variants.edges\",[]).find(({node})=>node.id===variantId);if(matchingVariant){setActiveVariant(matchingVariant.node);setIsInStock(isVariantAvailable(matchingVariant.node));setNeedsVariantSelection(false);return;// Exit early as we've found our variant\n}}// Immediately handle single variant products\nif(handleSingleVariantProduct(productNode)){return;// Exit early as we've handled the single variant\n}if(autoSelectFirst&&!isVariantManuallySelected){//console.log(\"Auto-selecting the first variant\");\nconst firstAvailableVariant=productNode.variants.edges.find(edge=>edge.node.availableForSale)?.node;if(firstAvailableVariant){setActiveVariant(firstAvailableVariant);// console.log(\n//     \"Setting first available variant\",\n//     firstAvailableVariant\n// )\nsetIsInStock(isVariantAvailable(firstAvailableVariant));setNeedsVariantSelection(false);//console.log(\"Setting variant with autoSelectFirst\", firstAvailableVariant);\nreturn;// Exit early as we've set the active variant\n}}// For multi-variant products without a selected variant\nsetNeedsVariantSelection(!shopifyProductVariantId);// Check if any variant is available\nconst anyVariantAvailable=get(productNode,\"variants.edges\",[]).some(({node})=>isVariantAvailable(node));setIsInStock(anyVariantAvailable);}else{setProduct(\"404\");setIsInStock(false);}};// Check if we already have product data available\nif(window.shopXtools?.products&&Array.isArray(window.shopXtools.products)){const _matchingProduct=window.shopXtools.products.find(({node})=>node.id===`gid://shopify/Product/${shopifyProductID}`);handleProductData(_matchingProduct);}const productsReadyHandler=()=>{if(window?.shopXtools?.products){const matchingProduct=window.shopXtools.products.find(({node:product})=>product.id===`gid://shopify/Product/${shopifyProductID}`);handleProductData(matchingProduct);}};const variantChangeHandler=e=>{// Only update the variant if no shopifyProductVariantId is provided\n// console.log(\"Variant changed, active variant is\", e.detail)\nif(e.detail){setActiveVariant(e.detail);setIsInStock(e.detail.quantityAvailable>0);setNeedsVariantSelection(false);setIsVariantManuallySelected(true);}};document.addEventListener(\"data__products-ready\",productsReadyHandler);document.addEventListener(\"product__active-variant__changed\",variantChangeHandler);// Analytics\nconst currency=activeVariant?.price?.currencyCode||\"USD\";const value=parseFloat((parseFloat(activeVariant?.price?.amount||\"0\")*1).toFixed(2));const item_id=activeVariant?.id;const item_name=activeVariant?.title;const price=parseFloat(activeVariant?.price?.amount||\"0\");// Google Analytics tracking\nif(typeof window.fcTrackGAEvent===\"function\"){// console.log(\"Tracking View Item - google:\", {\n//     currency,\n//     value,\n//     items: [{\n//         item_id,\n//         item_name,\n//         price,\n//         quantity: 1\n//     }]\n// });\nwindow.fcTrackGAEvent(\"view_item\",{currency,value,items:[{item_id,item_name,price,quantity:1}]});}// Meta Pixel tracking\nif(typeof fbq===\"function\"){// console.log(\"Tracking View Item - meta:\", {\n//     content_type: 'product',\n//     content_ids: [item_id],\n//     content_name: item_name,\n//     value,\n//     currency\n// });\nfbq(\"track\",\"ViewContent\",{content_type:\"product\",content_ids:[item_id],content_name:item_name,value,currency});}return()=>{document.removeEventListener(\"data__products-ready\",productsReadyHandler);document.removeEventListener(\"product__active-variant__changed\",variantChangeHandler);};},[shopifyProductID,shopifyProductVariantId,activeVariant,isBrowser,calculateTotalInventory,autoSelectFirst]);// Update variant selection state when activeVariant changes\nuseEffect(()=>{if(!product||product===\"404\")return;const variants=get(product,\"variants.edges\",[]);const hasMultipleVariants=variants.length>1;const noVariantSelected=!activeVariant&&!shopifyProductVariantId;setNeedsVariantSelection(hasMultipleVariants&&noVariantSelected);},[product,activeVariant,shopifyProductVariantId]);// Handle single variant products\nconst handleSingleVariantProducts=product=>{if(!product)return;const variants=get(product,\"variants.edges\",[]);if(variants.length===1){const variant=variants[0].node;setActiveVariant(variant);setIsInStock(variant.quantityAvailable>0);setNeedsVariantSelection(false);}};// Cart functionality\nconst handleSubscription=async(mutation,variables)=>{if(!isBrowser)return null;const handleCartMutation=window[\"shopXtools\"]?.handleCartMutation;if(handleCartMutation){return await handleCartMutation(mutation,variables);}throw new Error(\"handleCartMutation function not available\");};const isValidId=id=>id!==null&&id!==undefined&&id!==\"\";const fullId=`gid://shopify/ProductVariant/${props.shopifyProductVariantId}`;// Add new state for order field validation\nconst[orderFieldError,setOrderFieldError]=useState(false);// Debug logging function\nconst logDebug=(message,data)=>{// Empty function - no logging\n};// Enhanced validation function with logging\nconst validateOrderField=()=>{if(!props.required){logDebug(\"Validation skipped - not required\",{required:props.required});return true;}const productSpecificKey=`shopX_cart_attributes_${props.shopifyProductID}`;const storedAttributes=sessionStorage.getItem(productSpecificKey);logDebug(\"Checking stored attributes\",{productSpecificKey,hasStoredAttributes:!!storedAttributes});if(!storedAttributes){return false;}try{const attributes=JSON.parse(storedAttributes);const isValid=attributes?.Email&&attributes.Email.trim()!==\"\";logDebug(\"Validation result\",{attributes,isValid,email:attributes?.Email});return isValid;}catch(error){return false;}};// Effect to initialize validation state\nuseEffect(()=>{if(props.required){const isValid=validateOrderField();logDebug(\"Initial validation\",{isValid,required:props.required});setOrderFieldError(!isValid);}},[props.required,props.shopifyProductID]);// Listen for order field changes with logging\nuseEffect(()=>{if(props.required){const handleOrderFieldChange=event=>{logDebug(\"Order field change event received\",event.detail);const isValid=validateOrderField();setOrderFieldError(!isValid);logDebug(\"Order field validation updated\",{isValid,orderFieldError:!isValid});};window.addEventListener(\"orderFieldChanged\",handleOrderFieldChange);return()=>window.removeEventListener(\"orderFieldChanged\",handleOrderFieldChange);}},[props.required]);const[isInputRequired,setIsInputRequired]=useState(false);// Effect to check if the input field exists and is required\nuseEffect(()=>{const checkInputRequirement=()=>{const configKey=`shopX_input_config_${shopifyProductID}`;const config=sessionStorage.getItem(configKey);// Only set as required if the config exists and required is true\nif(config){const{required}=JSON.parse(config);setIsInputRequired(required);}else{// If no config exists, the field isn't on the page\nsetIsInputRequired(false);}};checkInputRequirement();// Listen for config changes\nwindow.addEventListener(\"inputConfigChanged\",checkInputRequirement);return()=>window.removeEventListener(\"inputConfigChanged\",checkInputRequirement);},[shopifyProductID]);const getLineItem=()=>{const merchandiseId=activeVariant?.id||(props.shopifyProductVariantId?`gid://shopify/ProductVariant/${props.shopifyProductVariantId}`:null);if(!merchandiseId){throw new Error(\"No valid product variant selected\");}const lineItem={merchandiseId,quantity:productQuantity};// Add selling plan ID if a subscription is selected\nif(planSelected&&planSelected!==\"one-time\"){lineItem[\"sellingPlanId\"]=planSelected;}try{const productSpecificKey=`shopX_cart_attributes_${props.shopifyProductID}`;const stored=sessionStorage.getItem(productSpecificKey);if(!stored)return lineItem;const data=JSON.parse(stored);const value=data[\"Email\"]||data[\"Order Note\"];const key=data[\"Email\"]?\"Email\":\"Order Note\";if(value&&value.trim()){lineItem[\"attributes\"]=[{key,value:value.trim()}];}}catch(e){// Error handling without logging\n}return lineItem;};const[maxQuantityReached,setMaxQuantityReached]=useState(false);// Modify the getCurrentCartQuantity function to add more logging\nconst getCurrentCartQuantity=useCallback(variantId=>{if(!cartExistingData?.lines?.edges){return 0;}const quantity=cartExistingData.lines.edges.reduce((total,{node})=>{if(node.merchandise.id===variantId){return total+node.quantity;}return total;},0);return quantity;},[cartExistingData]);const handleAddToCart=async()=>{try{if(!isBrowser)return;const variantId=activeVariant?.id||(props.shopifyProductVariantId?`gid://shopify/ProductVariant/${props.shopifyProductVariantId}`:null);if(props.maxQuantity>0){const currentCartQuantity=getCurrentCartQuantity(variantId);const totalRequestedQuantity=currentCartQuantity+productQuantity;if(currentCartQuantity>=props.maxQuantity){const message=`Maximum quantity of ${props.maxQuantity} already in cart`;window.dispatchEvent(new CustomEvent(\"errorChanged\",{detail:message}));setMaxQuantityReached(true);return;}if(totalRequestedQuantity>props.maxQuantity){const adjustedQuantity=props.maxQuantity-currentCartQuantity;setProductQuantity(adjustedQuantity);return;}}if(props.required||isInputRequired){const productSpecificKey=`shopX_cart_attributes_${props.shopifyProductID}`;const storedAttributes=sessionStorage.getItem(productSpecificKey);const inputElement=document.querySelector(`[data-product-id=\"${props.shopifyProductID}\"]`);const currentInputValue=inputElement?.value||\"\";if(currentInputValue&&(!storedAttributes||currentInputValue!==JSON.parse(storedAttributes)?.Email)){window.dispatchEvent(new CustomEvent(\"inputValidationFailed\",{detail:{productId:props.shopifyProductID,message:\"Please save your email before adding to cart\"}}));return;}if(!storedAttributes||!JSON.parse(storedAttributes)?.Email||JSON.parse(storedAttributes).Email.trim()===\"\"){window.dispatchEvent(new CustomEvent(\"inputValidationFailed\",{detail:{productId:props.shopifyProductID,message:\"Please fill in all required fields\"}}));return;}}const lines=[getLineItem()];// Retrieve the selected country code from localStorage\nconst countryCode=localStorage.getItem(\"selectedCountryCode\");let existingCartId=localStorage.getItem(\"shopX_cart_id\");if(!BuyNowATC){if(existingCartId){try{const cartValidation=await window.shopXtools.handleCartMutation(cartQuery,{cartId:existingCartId});if(!cartValidation?.cart){localStorage.removeItem(\"shopX_cart_id\");localStorage.removeItem(\"shopXtools.cart\");existingCartId=null;}}catch(error){localStorage.removeItem(\"shopX_cart_id\");localStorage.removeItem(\"shopXtools.cart\");existingCartId=null;}}if(!existingCartId){try{const cartData=await window.shopXtools.handleCartMutation(createCartMutation,{lines,countryCode:countryCode});if(cartData?.cartCreate?.cart?.id){localStorage.setItem(\"shopX_cart_id\",cartData.cartCreate.cart.id);localStorage.setItem(\"shopXtools.cart\",JSON.stringify(cartData.cartCreate.cart));window.shopXtools.cart=cartData.cartCreate.cart;// Dispatch event after updating the cart\nwindow.dispatchEvent(new Event(\"shopXtools-cart-update\"));// Analytics\nconst currency=activeVariant?.price?.currencyCode||\"USD\";const value=parseFloat((parseFloat(activeVariant?.price?.amount||\"0\")*productQuantity).toFixed(2));const item_id=activeVariant?.id;const item_name=activeVariant?.title;const price=parseFloat(activeVariant?.price?.amount||\"0\");const activeProduct=product;// Google Analytics tracking\nif(typeof window.fcTrackGAEvent===\"function\"){// console.log(\"Tracking Add to Cart - google:\", {\n//     currency,\n//     value,\n//     items: [{\n//         item_id,\n//         item_name,\n//         price,\n//         quantity: productQuantity\n//     }]\n// });\nwindow.fcTrackGAEvent(\"add_to_cart\",{currency,value,items:[{item_id,item_name,price,quantity:productQuantity}]});}// Meta Pixel tracking\nif(typeof fbq===\"function\"){// console.log(\"Tracking Add ToCart - meta:\", {\n//     ccontent_type: 'product',\n//     content_ids: [item_id],\n//     content_name: activeProduct?.title,\n//     value,\n//     currency,\n//     contents: [{\n//         merchandiseId: item_id,\n//         price: price,\n//         quantity: productQuantity\n//     }]\n// })\nfbq(\"track\",\"AddToCart\",{content_type:\"product\",content_ids:[item_id],content_name:activeProduct?.title,value,currency,contents:[{merchandiseId:item_id,price:price,quantity:productQuantity}]});}window.shopXtools.dispatchEvent(\"checkout__changed\",{__triggerCartModal:openCart});}else{window.dispatchEvent(new CustomEvent(\"errorChanged\",{detail:\"Failed to add to cart\"}));}}catch(error){window.dispatchEvent(new CustomEvent(\"errorChanged\",{detail:error.message||\"Failed to create new cart\"}));}}else{const cartData=await window.shopXtools.handleCartMutation(addToCartMutation,{cartId:existingCartId,lines});if(cartData?.cartLinesAdd?.cart){localStorage.setItem(\"shopXtools.cart\",JSON.stringify(cartData.cartLinesAdd.cart));window.shopXtools.cart=cartData.cartLinesAdd.cart;// Dispatch event after updating the cart\nwindow.dispatchEvent(new Event(\"shopXtools-cart-update\"));// Google Analytics tracking\nconst currency=activeVariant?.price?.currencyCode||\"USD\";const value=parseFloat((parseFloat(activeVariant?.price?.amount||\"0\")*productQuantity).toFixed(2));const item_id=activeVariant?.id;const item_name=activeVariant?.title;const price=parseFloat(activeVariant?.price?.amount||\"0\");const activeProduct=product;// Google Analytics tracking\nif(typeof window.fcTrackGAEvent===\"function\"){// console.log(\"Tracking Add to Cart - google:\", {\n//     currency,\n//     value,\n//     items: [{\n//         item_id,\n//         item_name,\n//         price,\n//         quantity: productQuantity\n//     }]\n// });\nwindow.fcTrackGAEvent(\"add_to_cart\",{currency,value,items:[{item_id,item_name,price,quantity:productQuantity}]});}// Meta Pixel tracking\nif(typeof fbq===\"function\"){// console.log(\"Tracking Add ToCart - meta:\", {\n//     content_type: 'product',\n//     content_ids: [item_id],\n//     content_name: activeProduct?.title,\n//     value,\n//     currency,\n//     contents: {\n//         merchandiseId: item_id,\n//         price: price,\n//         quantity: productQuantity\n//     }\n// })\nfbq(\"track\",\"AddToCart\",{content_type:\"product\",content_ids:[item_id],content_name:activeProduct?.title,value,currency,contents:[{merchandiseId:item_id,price:price,quantity:productQuantity}]});}window.shopXtools.dispatchEvent(\"checkout__changed\",{__triggerCartModal:openCart});}else{window.dispatchEvent(new CustomEvent(\"errorChanged\",{detail:\"Failed to add to cart\"}));}}}// Directly proceed to checkout without opening the cart modal\nif(BuyNowATC){//console.log(\"Directly proceeding to checkout without opening the cart modal\")\n// Create the cart and proceed to checkout\nconst variables={lines,countryCode:countryCode};//console.log(\"Sending mutation with variables:\", variables)\nconst result=await window[\"shopXtools\"]?.handleTemporaryCartMutation(createCartMutation,variables);//console.log(\"result:\", result)\nconst checkoutUrl=result.cartCreate.cart.checkoutUrl;if(checkoutUrl){//console.log(\"checkoutUrl:\", checkoutUrl)\nlet finalCheckoutUrl=checkoutUrl;if(finalCheckoutUrl){// Analytics\nconst currency=activeVariant?.price?.currencyCode||\"USD\";const value=parseFloat((parseFloat(activeVariant?.price?.amount||\"0\")*productQuantity).toFixed(2));const item_id=activeVariant?.id;const item_name=activeVariant?.title;const price=parseFloat(activeVariant?.price?.amount||\"0\");// Google Analytics tracking\nif(typeof window.fcTrackGAEvent===\"function\"){// console.log(\"Tracking Initiate Checkout (Buy now) - google:\", {\n//     currency,\n//     value,\n//     item_id,\n//     item_name,\n//     price,\n//     quantity: productQuantity\n// });\nwindow.fcTrackGAEvent(\"begin_checkout\",{currency,value,items:[{item_id,item_name,price,quantity:productQuantity}]});}// Meta Pixel tracking\nif(typeof fbq===\"function\"){// console.log(\"Tracking Initiate Checkout (Buy now) - meta:\", {\n//     content_type: 'product',\n//     content_ids: [activeVariant?.id],\n//     value,\n//     currency,\n//     num_items: productQuantity\n// })\nfbq(\"track\",\"InitiateCheckout\",{content_type:\"product\",content_ids:[activeVariant?.id],value,currency,num_items:productQuantity});}finalCheckoutUrl=appendUTMParamsToUrl(finalCheckoutUrl);finalCheckoutUrl=appendLanguageToUrl(finalCheckoutUrl);window.location.assign(finalCheckoutUrl)// Use assign instead of href to avoid page reload and make sure it works in Safari and Chrome\n;}}else{window.dispatchEvent(new CustomEvent(\"errorChanged\",{detail:\"Failed to create cart for checkout\"}));}}if(lines[0].attributes){// const cartId = existingCartId || cartData?.cartCreate?.cart?.id;\nconst cartId=existingCartId//removed check for cartData\n;await window.shopXtools.handleCartMutation(updateCartAttributes,{cartId,attributes:lines[0].attributes});}}catch(error){window.dispatchEvent(new CustomEvent(\"errorChanged\",{detail:error.message||\"Failed to add item to cart\"}));}};useEffect(()=>{let timer;if(isLoading){setShouldShowLoading(false);timer=setTimeout(()=>{setShouldShowLoading(true);},200)// 200ms delay before showing loading state\n;}else{setShouldShowLoading(false);}return()=>{if(timer)clearTimeout(timer);};},[isLoading]);// Update loading state when product data is received\nuseEffect(()=>{if(product){setIsLoading(false);}},[product]);// Initialize hasInitialized\nuseEffect(()=>{if(!hasInitialized&&product){// Small delay to ensure we have all the necessary data\nconst timer=setTimeout(()=>{setHasInitialized(true);},50);return()=>clearTimeout(timer);}},[product]);let content=null;if(RenderTarget.current()===RenderTarget.canvas){content=available?.[0]||null// Always show available state in canvas\n;}else if(!hasInitialized){content=null;}else if(needsVariantSelection){content=SelectVariant?.[0]||null;}else if(maxQuantityReached&&props.MaxQuantityReached?.[0]){content=props.MaxQuantityReached[0];}else if(!isInStock&&!activeVariant?.availableForSale||activeVariant&&!isVariantAvailable(activeVariant)||product&&!get(product,\"variants.edges\",[]).some(({node})=>isVariantAvailable(node))||props.required&&orderFieldError){content=OutOfStock?.[0]||null;}else{content=available?.[0]||null;}// Near the bottom of the component where we create clonedElement\nconst canAddToCart=(isInStock||activeVariant&&activeVariant.availableForSale)&&!needsVariantSelection&&!maxQuantityReached&&(!props.required||!orderFieldError);const handleClick=e=>{if(canAddToCart){handleAddToCart();}};// Single consolidated effect for maxQuantityReached\nuseEffect(()=>{if(!props.maxQuantity){if(maxQuantityReached){setMaxQuantityReached(false);}return;}const variantId=activeVariant?.id||(props.shopifyProductVariantId?`gid://shopify/ProductVariant/${props.shopifyProductVariantId}`:null);if(!variantId||!cartExistingData?.lines?.edges){if(maxQuantityReached){setMaxQuantityReached(false);}return;}const currentQuantity=cartExistingData.lines.edges.reduce((total,{node})=>{if(node.merchandise.id===variantId){return total+node.quantity;}return total;},0);const shouldBeAtMax=currentQuantity>=props.maxQuantity;if(shouldBeAtMax!==maxQuantityReached){setMaxQuantityReached(shouldBeAtMax);}},[props.maxQuantity,activeVariant,props.shopifyProductVariantId,cartExistingData,maxQuantityReached]);const clonedElement=content?/*#__PURE__*/cloneElement(content,{style:{...content.props?.style||{},width:\"100%\",height:\"100%\",cursor:canAddToCart?\"pointer\":\"not-allowed\",transition:hasInitialized?\"opacity 0.2s ease-in-out\":\"none\",opacity:1},onClick:handleClick,\"aria-hidden\":!hasInitialized,tabIndex:hasInitialized?0:-1}):/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color:\"#666\",fontSize:\"14px\",border:\"1px dashed #ccc\",borderRadius:\"4px\"},children:\"Connect Instance\"});const debugInfo=RenderTarget.current()!==RenderTarget.canvas&&/*#__PURE__*/_jsxs(\"div\",{style:{position:\"absolute\",bottom:\"100%\",left:0,background:\"#f0f0f0\",padding:\"4px\",fontSize:\"10px\",display:props.maxQuantity>0?\"block\":\"none\"},children:[\"Max: \",props.maxQuantity,\" | Current:\",\" \",getCurrentCartQuantity(activeVariant?.id||(props.shopifyProductVariantId?`gid://shopify/ProductVariant/${props.shopifyProductVariantId}`:null)),\" \",\"| At Max: \",maxQuantityReached?\"Yes\":\"No\"]});// Add this effect near the other useEffect hooks\nuseEffect(()=>{if(props.maxQuantity>0){window.dispatchEvent(new CustomEvent(\"setMaxQuantity\",{detail:{productId:props.shopifyProductID,maxQuantity:props.maxQuantity}}));}},[props.maxQuantity,props.shopifyProductID]);// Add this effect to handle cart updates\nuseEffect(()=>{if(props.maxQuantity>0&&cartExistingData){const variantId=activeVariant?.id||(props.shopifyProductVariantId?`gid://shopify/ProductVariant/${props.shopifyProductVariantId}`:null);const currentInCart=getCurrentCartQuantity(variantId);const remainingAllowed=Math.max(0,props.maxQuantity-currentInCart);window.dispatchEvent(new CustomEvent(\"setMaxQuantity\",{detail:{productId:props.shopifyProductID,maxQuantity:remainingAllowed}}));if(productQuantity>remainingAllowed){setProductQuantity(remainingAllowed);}}},[cartExistingData,props.maxQuantity,activeVariant,props.shopifyProductVariantId,getCurrentCartQuantity]);// Add this effect to handle quantity max reached events\nuseEffect(()=>{const handleQuantityMaxReached=event=>{const{productId,maxQuantity}=event.detail;if(productId===props.shopifyProductID){setMaxQuantityReached(true);}};window.addEventListener(\"quantityMaxReached\",handleQuantityMaxReached);return()=>window.removeEventListener(\"quantityMaxReached\",handleQuantityMaxReached);},[props.shopifyProductID]);// Modify the effect that sets initial max quantity\nuseEffect(()=>{if(props.maxQuantity>0){const variantId=activeVariant?.id||(props.shopifyProductVariantId?`gid://shopify/ProductVariant/${props.shopifyProductVariantId}`:null);const currentInCart=getCurrentCartQuantity(variantId);const remainingAllowed=Math.max(0,props.maxQuantity-currentInCart);window.dispatchEvent(new CustomEvent(\"setMaxQuantity\",{detail:{productId:props.shopifyProductID,maxQuantity:remainingAllowed}}));}},[props.maxQuantity,props.shopifyProductID,getCurrentCartQuantity,activeVariant,props.shopifyProductVariantId]);return /*#__PURE__*/_jsxs(\"div\",{style:{height:\"100%\",position:\"relative\"},role:\"none\",className:\"fc-purchase-button-container\",children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                .fc-purchase-button-container :focus-visible {\n                    outline: ${props.focus.width}px solid ${props.focus.color} !important;\n                    outline-offset: ${props.focus.padding}px !important;\n                    border-radius: ${props.focus.radius}px !important;\n                }\n            `}),debugInfo,RenderTarget.current()===RenderTarget.canvas?// In canvas, only render the available state\navailable?.[0]&&/*#__PURE__*/cloneElement(available[0],{style:{...available[0].props?.style||{},width:\"100%\",height:\"100%\",cursor:\"pointer\",outline:\"none\"},onClick:handleClick,role:\"button\",\"aria-label\":props.BuyNowATC?\"Buy now\":\"Add to cart\"}):// In browser, render all states but only show the active one\n/*#__PURE__*/_jsxs(\"div\",{style:{height:\"100%\",position:\"relative\"},children:[available?.[0]&&/*#__PURE__*/cloneElement(available[0],{style:{...available[0].props?.style||{},width:\"100%\",height:\"100%\",cursor:canAddToCart?\"pointer\":\"not-allowed\",transition:hasInitialized?\"opacity 0.3s ease-in-out\":\"none\",opacity:content===available?.[0]?1:0,position:\"absolute\",top:0,left:0,pointerEvents:content===available?.[0]?\"auto\":\"none\",visibility:content===available?.[0]?\"visible\":\"hidden\",outline:\"none\",zIndex:content===available?.[0]?2:0,transitionDelay:content===available?.[0]?\"0s\":\"0s\"},onClick:handleClick,onKeyDown:e=>{if(e.key===\"Enter\"||e.key===\" \"){e.preventDefault();if(canAddToCart){handleClick(e);}}},role:\"button\",\"aria-disabled\":!canAddToCart,\"aria-label\":props.BuyNowATC?\"Buy now\":\"Add to cart\",tabIndex:content===available?.[0]&&hasInitialized?0:-1,\"aria-hidden\":content!==available?.[0]||!hasInitialized}),OutOfStock?.[0]&&/*#__PURE__*/cloneElement(OutOfStock[0],{style:{...OutOfStock[0].props?.style||{},width:\"100%\",height:\"100%\",cursor:\"not-allowed\",transition:hasInitialized?\"opacity 0.3s ease-in-out\":\"none\",opacity:content===OutOfStock?.[0]?1:0,position:\"absolute\",top:0,left:0,pointerEvents:content===OutOfStock?.[0]?\"auto\":\"none\",visibility:content===OutOfStock?.[0]?\"visible\":\"hidden\",outline:\"none\",zIndex:content===OutOfStock?.[0]?2:0,transitionDelay:content===OutOfStock?.[0]?\"0s\":\"0s\"},role:\"button\",\"aria-disabled\":true,\"aria-label\":\"Out of stock\",tabIndex:content===OutOfStock?.[0]&&hasInitialized?0:-1,\"aria-hidden\":content!==OutOfStock?.[0]||!hasInitialized}),SelectVariant?.[0]&&/*#__PURE__*/cloneElement(SelectVariant[0],{style:{...SelectVariant[0].props?.style||{},width:\"100%\",height:\"100%\",cursor:\"not-allowed\",transition:hasInitialized?\"opacity 0.3s ease-in-out\":\"none\",opacity:content===SelectVariant?.[0]?1:content===available?.[0]||content===OutOfStock?.[0]?1-(hasInitialized?1:0):0,position:\"absolute\",top:0,left:0,pointerEvents:content===SelectVariant?.[0]?\"auto\":\"none\",visibility:content===SelectVariant?.[0]||(content===available?.[0]||content===OutOfStock?.[0])&&hasInitialized?\"visible\":\"hidden\",outline:\"none\",zIndex:content===SelectVariant?.[0]?2:1,transitionDelay:content===SelectVariant?.[0]?\"0s\":\"0.3s\"},role:\"button\",\"aria-disabled\":true,\"aria-label\":\"Select variant\",tabIndex:content===SelectVariant?.[0]&&hasInitialized?0:-1,\"aria-hidden\":content!==SelectVariant?.[0]||!hasInitialized})]}),LoadingState?.[0]&&RenderTarget.current()!==RenderTarget.canvas&&/*#__PURE__*/cloneElement(LoadingState[0],{style:{...LoadingState[0].props?.style||{},width:\"100%\",height:\"100%\",position:\"absolute\",top:0,left:0,opacity:isLoading&&shouldShowLoading&&!props.skipLoading?1:0,pointerEvents:isLoading&&shouldShowLoading&&!props.skipLoading?\"auto\":\"none\",visibility:isLoading&&shouldShowLoading&&!props.skipLoading?\"visible\":\"hidden\",transition:\"opacity 0.2s ease-in-out\",outline:\"none\"},role:\"status\",\"aria-label\":`Loading ${props.BuyNowATC?\"buy now\":\"add to cart\"} button`,\"aria-live\":\"polite\",tabIndex:-1,\"aria-hidden\":!isLoading||!shouldShowLoading||props.skipLoading})]});}addPropertyControls(FC_ProductPurchaseButton,{shopifyProductID:{type:ControlType.String,title:\"Product ID\",description:\"Connect to CMS\"},shopifyProductVariantId:{type:ControlType.String,title:\"Variant ID\",description:\"Manually set a specific product variant ID (optional).\"},available:{type:ControlType.ComponentInstance,title:\"Available\"},OutOfStock:{type:ControlType.ComponentInstance,title:\"Out of Stock\"},SelectVariant:{type:ControlType.ComponentInstance,title:\"Select Variant\"},LoadingState:{type:ControlType.ComponentInstance,title:\"Loading\"},BuyNowATC:{title:\"Buy Now\",description:\"Enabling will skip the cart and go right to checkout.\",type:ControlType.Boolean,enabledTitle:\"Yes\",disabledTitle:\"No\",defaultValue:false},openCart:{title:\"Trigger Cart\",description:\"Open your cart on click. If button is inside the cart, select No to keep the cart open.\",type:ControlType.Boolean,enabledTitle:\"Yes\",disabledTitle:\"No\",defaultValue:true},skipLoading:{title:\"Skip Loading\",description:\"Skip loading state\",type:ControlType.Boolean,enabledTitle:\"Yes\",disabledTitle:\"No\",defaultValue:false},focus:{type:ControlType.Object,title:\"Focus\",controls:{radius:{type:ControlType.Number,title:\"Radius\",defaultValue:0,min:0,max:100,step:1,displayStepper:true},width:{type:ControlType.Number,title:\"Width\",defaultValue:2,min:0,max:20,step:1,displayStepper:true},padding:{type:ControlType.Number,title:\"Padding\",defaultValue:2,min:0,max:20,step:1,displayStepper:true},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#007AFF\"}}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FC_ProductPurchaseButton\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FC_ProductPurchaseButton.map","/*\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{addPropertyControls,ControlType}from\"framer\";import{useEffect,useState,useCallback}from\"react\";import{get}from\"lodash-es\";/**\n * @framerDisableUnlink\n */export default function FC_ProductVariantState(props){const{shopifyProductID,textTemplate}=props;const[product,setProduct]=useState();const[selectedOptions,setSelectedOptions]=useState({});// Move handler outside useEffect for better stability\nconst handleVariantSelection=useCallback(event=>{// Directly set the new selected options\nsetSelectedOptions(prev=>({...prev,[event.detail.optionName]:event.detail.value}));},[]);useEffect(()=>{if(window[\"shopXtools\"]&&Array.isArray(window[\"shopXtools\"].products)){const _matchingProduct=window[\"shopXtools\"].products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);setProduct(_matchingProduct?_matchingProduct.node:\"404\");}else{document.addEventListener(\"data__products-ready\",e=>{if(Array.isArray(e.detail.products)){const _matchingProduct=e.detail.products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);setProduct(_matchingProduct?_matchingProduct.node:\"404\");}});}document.addEventListener(\"variant_option_selected\",handleVariantSelection);return()=>{document.removeEventListener(\"variant_option_selected\",handleVariantSelection);};},[shopifyProductID,handleVariantSelection]);useEffect(()=>{const handleCurrencyChange=event=>{const{currency}=event.detail;if(window[\"shopXtools\"]&&Array.isArray(window[\"shopXtools\"].products)){const _matchingProduct=window[\"shopXtools\"].products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(_matchingProduct.node);}}};window.addEventListener(\"currency_changed\",handleCurrencyChange);return()=>{window.removeEventListener(\"currency_changed\",handleCurrencyChange);};},[shopifyProductID]);const options=get(product,\"options\",[]);// Get remaining unselected options\nconst remainingOptions=options.filter(opt=>!selectedOptions[opt.name]).map(opt=>opt.name);// In Framer canvas or when shopXtools is not ready, show placeholder\nconst isFramerCanvas=typeof window===\"undefined\"||!window[\"shopXtools\"];const displayText=isFramerCanvas?textTemplate.replace(\"{{variant}}\",\"Size\"):remainingOptions.length===0?\"\":textTemplate.replace(\"{{variant}}\",remainingOptions.join(\", \"));// If no text to display, return empty div\nif(!displayText){return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\"}});}return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:/*#__PURE__*/_jsx(\"p\",{style:{...props.font,color:props.color,margin:0,textAlign:\"center\",textTransform:props.textTransform},children:displayText})});}FC_ProductVariantState.defaultProps={shopifyProductID:\"\",textTemplate:\"Select {{variant}}\",textTransform:\"none\",color:\"#000000\"};addPropertyControls(FC_ProductVariantState,{shopifyProductID:{type:ControlType.String,title:\"Product ID\"},textTemplate:{type:ControlType.String,title:\"Format\",description:\"Use {{variant}} to insert the variant name\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000000\"},textTransform:{type:ControlType.Enum,title:\"Transform\",options:[\"None\",\"Uppercase\",\"Lowercase\",\"Capitalize\"],defaultValue:\"none\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FC_ProductVariantState\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FC_ProductVariantState.map","/*\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,useMemo,useState}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{get}from\"lodash-es\";import{useIsBrowser}from\"https://framerusercontent.com/modules/ncBs5KPMI9I5GEta13fn/zGXDjuZapa1SGy6D8P5e/IsBrowser.js\";import{knownCurrenciesWithCodeAsSymbol}from\"https://framerusercontent.com/modules/k9s4cejdkBGDjmzudhzM/18cq93eooqM4YmdbL7E2/currencyMaps.js\";import{getLocaleFromCountry}from\"https://framerusercontent.com/modules/vC6fzbfO83MgBPIhn5zl/N2GIWD1ik8HES3ASBGeD/locales.js\";// Helper function to check if a currency's symbol is the same as its code\nconst isCurrencySymbolSameAsCode=currencyCode=>{// For some currencies like CHF, the browser might use the code as the symbol\nif(!currencyCode)return false;if(knownCurrenciesWithCodeAsSymbol.includes(currencyCode)){return true;}try{const formatted=new Intl.NumberFormat(undefined,{style:\"currency\",currency:currencyCode,currencyDisplay:\"narrowSymbol\"}).format(0);// Remove digits, decimal points, and common formatting characters\nconst cleanFormatted=formatted.replace(/[0-9.,\\s]/g,\"\");// Check if what remains is the currency code\nreturn cleanFormatted===currencyCode;}catch(e){return false;}};export default function FC_ProductPrice(props){const{shopifyProductID,canvasPrice,format:{showCurrency,showSymbol,showDecimals,currencyCode}={}}=props;const isBrowser=useIsBrowser();const[product,setProduct]=useState();const[activeVariant,setActiveVariant]=useState();const[subscriptionPrice,setSubscriptionPrice]=useState(null);const[selectedCurrency,setSelectedCurrency]=useState(\"\");const[selectedCountryCode,setSelectedCountryCode]=useState(\"\");const[selectedCountry,setSelectedCountry]=useState(\"\");const[isLoadingPrice,setIsLoadingPrice]=useState(false);// Initialize currency and country code on page load\nuseEffect(()=>{if(!isBrowser)return;const storedCurrency=localStorage.getItem(\"selectedCurrency\");const storedCountryCode=localStorage.getItem(\"selectedCountryCode\");const storedCountry=localStorage.getItem(\"selectedCountry\");setSelectedCurrency(storedCurrency||\"USD\");setSelectedCountryCode(storedCountryCode||\"US\");setSelectedCountry(storedCountry||\"United States\");},[isBrowser]);// Handle variant changes\nconst handleVariantChange=async e=>{if(!e.detail){return;}setIsLoadingPrice(true);try{// Get products from shopXtools storage\nconst products=window.shopXtools?.products||[];const _matchingProduct=products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(_matchingProduct.node);// Find the matching variant in the current product data\nconst matchingVariant=_matchingProduct.node?.variants?.edges?.find(({node})=>node.selectedOptions.every(option=>e.detail.selectedOptions.find(detailOption=>detailOption.name===option.name&&detailOption.value===option.value)));if(matchingVariant){setActiveVariant(matchingVariant.node);}}}catch(error){// Fallback to using the event detail directly\nsetActiveVariant(e.detail);}finally{setIsLoadingPrice(false);}};// Listen for currency changes\nuseEffect(()=>{if(!isBrowser)return;const handleCurrencyChange=event=>{setIsLoadingPrice(true);const{currency,countryCode,country}=event.detail;setSelectedCurrency(currency);setSelectedCountryCode(countryCode);setSelectedCountry(country);try{// Get products from shopXtools storage\nconst products=window.shopXtools?.products||[];const _matchingProduct=products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(_matchingProduct.node);// Preserve active variant selection if possible\nif(activeVariant){const matchingVariant=_matchingProduct.node.variants?.edges.find(({node})=>node.selectedOptions.every(option=>activeVariant.selectedOptions.find(activeOption=>activeOption.name===option.name&&activeOption.value===option.value)));if(matchingVariant){setActiveVariant(matchingVariant.node);}}}}catch(error){// Error handling\n}finally{setIsLoadingPrice(false);}};window.addEventListener(\"currency_changed\",handleCurrencyChange);return()=>{window.removeEventListener(\"currency_changed\",handleCurrencyChange);};},[isBrowser,shopifyProductID,activeVariant,selectedCurrency,selectedCountryCode]);// Initial product load\nuseEffect(()=>{if(!isBrowser)return;const handleProductsReady=async e=>{if(Array.isArray(e.detail.products)){const _matchingProduct=e.detail.products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(_matchingProduct.node);if(_matchingProduct.node?.variants?.edges?.length===1){setActiveVariant(_matchingProduct.node.variants.edges[0].node);}setActiveVariant(_matchingProduct.node?.variants?.edges[0].node);}}};const loadProduct=async()=>{try{// Get products from shopXtools storage\nconst products=window.shopXtools?.products||[];const _matchingProduct=products.find(({node:_product})=>_product.id===`gid://shopify/Product/${shopifyProductID}`);if(_matchingProduct){setProduct(_matchingProduct.node);if(_matchingProduct.node?.variants?.edges?.length===1){setActiveVariant(_matchingProduct.node.variants.edges[0].node);}setActiveVariant(_matchingProduct.node?.variants?.edges[0].node);}}catch(error){// Error handling\n}finally{setIsLoadingPrice(false);}};loadProduct();// Add event listeners\ndocument.addEventListener(\"product__active-variant__changed\",handleVariantChange);document.addEventListener(\"data__products-ready\",handleProductsReady);// Cleanup\nreturn()=>{document.removeEventListener(\"product__active-variant__changed\",handleVariantChange);document.removeEventListener(\"data__products-ready\",handleProductsReady);};},[isBrowser,shopifyProductID,selectedCurrency,selectedCountryCode]);// Add subscription price listener\nuseEffect(()=>{if(!isBrowser)return;const handleSubscriptionPriceUpdate=e=>{if(e.detail?.price){//console.log(\"selling plan event\", e.detail)\nsetSubscriptionPrice(e.detail.price);}else{setSubscriptionPrice(null);}};document.addEventListener(\"subscription__price-update\",handleSubscriptionPriceUpdate);return()=>{document.removeEventListener(\"subscription__price-update\",handleSubscriptionPriceUpdate);};},[isBrowser]);// Get currency formatting options at component level\nconst _currencyCode=useMemo(()=>{const variantCurrency=get(activeVariant,\"price.currencyCode\");const productCurrency=get(product,\"priceRange.minVariantPrice.currencyCode\");return variantCurrency||productCurrency||\"USD\";},[activeVariant,product]);const showMockValues=useMemo(()=>RenderTarget.current()===RenderTarget.canvas||isBrowser&&window.location.origin.endsWith(\"framercanvas.com\"),[isBrowser]);// Common function to format price based on options\nconst formatPriceWithOptions=(numericPrice,currCode)=>{const symbolSameAsCode=isCurrencySymbolSameAsCode(currCode);// Get locale from selected country code\nconst locale=getLocaleFromCountry(selectedCountryCode);// Log browser user agent for debugging iOS-specific issues\n// if (isBrowser) {\n//     console.log(\"[FC_ProductPrice] Format debug:\", {\n//         userAgent: navigator.userAgent,\n//         isCurrencySymbolSameAsCode: symbolSameAsCode,\n//         currencyCode: currCode,\n//         selectedCountryCode,\n//         locale,\n//         showSymbol,\n//         showCurrency,\n//         showDecimals,\n//     })\n// }\n// Determine if we should show decimals based on the setting\nconst shouldShowDecimals=()=>{if(showDecimals===\"Always show\")return true;if(showDecimals===\"Never show\")return false;if(showDecimals===\"Hide when .00\"){// Check if the decimal part is zero\nreturn numericPrice%1!==0;}return true// Default fallback\n;};const decimalDigits=shouldShowDecimals()?2:0;// If showing neither symbol nor code, just format the number\nif(!showSymbol&&!showCurrency){const formattedNumber=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);return formattedNumber;}// Special case for USD to prevent \"US$\" display in Safari iOS\nif(currCode===\"USD\"&&showSymbol){// Check if running on iOS device\nconst isIOS=isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream;// Format USD manually to avoid the iOS \"US$\" prefix\nif(isIOS){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);if(!showCurrency){return`$${number}`// Just \"$50\" format\n;}else{return`$${number} USD`// \"$50 USD\" format\n;}}else{// For non-iOS devices, continue with normal formatting but use\n// a more controlled approach to ensure consistency\nif(!showCurrency){return new Intl.NumberFormat(locale,{style:\"currency\",currency:\"USD\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);}else{const withSymbol=new Intl.NumberFormat(locale,{style:\"currency\",currency:\"USD\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);return`${withSymbol} USD`;}}}// For currencies where symbol is same as code (like CHF)\nif(symbolSameAsCode){// If showing currency code, always use code-first format and ignore symbol\nif(showCurrency&&!showSymbol){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);const output=`${currCode} ${number}`;return output;}if(showSymbol&&!showCurrency){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);const output=`${currCode} ${number}`;return output;}if(showCurrency&&showSymbol){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);return`${currCode} ${number}`;}}// For currencies with distinct symbols (like USD with $)\n// If showing only the code (no symbol)\nif(!showSymbol&&showCurrency){const number=new Intl.NumberFormat(locale,{style:\"decimal\",minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits}).format(numericPrice);// For normal currencies, show code after the number\nreturn`${number} ${currCode}`;}// If showing only the symbol (no code)\nif(showSymbol&&!showCurrency){return new Intl.NumberFormat(locale,{style:\"currency\",currency:currCode,minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);}// If showing both symbol and code\nconst withSymbol=new Intl.NumberFormat(locale,{style:\"currency\",currency:currCode,minimumFractionDigits:decimalDigits,maximumFractionDigits:decimalDigits,currencyDisplay:\"narrowSymbol\"}).format(numericPrice);return`${withSymbol} ${currCode}`;};const text=useMemo(()=>{if(!isBrowser)return\"\";// For canvas view, handle the display options directly\nif(typeof RenderTarget!==\"undefined\"&&(RenderTarget.current()===RenderTarget.canvas||showMockValues)){const price=canvasPrice||\"50.00\";const numericPrice=parseFloat(price);const currentCurrencyCode=currencyCode||\"USD\";return formatPriceWithOptions(numericPrice,currentCurrencyCode);}// For live view, use the selected currency or preview currency\nconst amount=subscriptionPrice||(activeVariant?get(activeVariant,\"price.amount\"):get(product,\"priceRange.minVariantPrice.amount\"));if(!amount)return\"\";const numericPrice=parseFloat(amount);if(isNaN(numericPrice))return\"\";const currentCurrencyCode=selectedCurrency||currencyCode||\"USD\";return formatPriceWithOptions(numericPrice,currentCurrencyCode);},[isBrowser,showMockValues,activeVariant,product,canvasPrice,showCurrency,showSymbol,currencyCode,showDecimals,selectedCurrency,subscriptionPrice,props.format]);const compareAtPrice=useMemo(()=>{const amount=activeVariant?get(activeVariant,\"compareAtPrice.amount\"):get(product,\"compareAtPriceRange.minVariantPrice.amount\");if(!amount)return\"\";const numericPrice=parseFloat(amount);if(isNaN(numericPrice))return\"\";const currentCurrencyCode=selectedCurrency||currencyCode||\"USD\";// Use the same formatting function as the main price\nreturn formatPriceWithOptions(numericPrice,currentCurrencyCode);},[activeVariant,product,currencyCode,showCurrency,showSymbol,showDecimals,selectedCurrency,showMockValues,props.format]);const numericValue=useMemo(()=>parseFloat(compareAtPrice.replace(/[^\\d.-]/g,\"\")),[compareAtPrice]);const hasValidCompareAtPrice=!isNaN(numericValue)&&numericValue>0;// console.log(\"Text\", text)\n// Price calculation logging\n// useEffect(() => {\n//     console.log(\"[FC_ProductPrice] Price State Update:\", {\n//         activeVariant,\n//         product,\n//         selectedCurrency,\n//         subscriptionPrice,\n//     })\n// }, [activeVariant, product, selectedCurrency, subscriptionPrice])\n// useEffect(() => {\n//     console.log(\"Active variant updated:\", activeVariant);\n// }, [activeVariant]);\n// Return placeholder during SSR\nif(!isBrowser){return /*#__PURE__*/_jsx(\"div\",{style:{display:\"inline-flex\"}});}return /*#__PURE__*/_jsx(\"div\",{style:{display:\"inline-flex\",whiteSpace:\"nowrap\"},children:/*#__PURE__*/_jsx(\"p\",{style:{margin:0,whiteSpace:\"nowrap\",...props[hasValidCompareAtPrice?\"saleFont\":\"regularFont\"],color:props[hasValidCompareAtPrice?\"saleColor\":\"regularColor\"]},children:text})});}// Property controls remain the same\nFC_ProductPrice.defaultProps={shopifyProductID:\"\",canvasPrice:\"50.00\",format:{showCurrency:true,showSymbol:true,currencyCode:\"USD\",showDecimals:\"Always show\"}};addPropertyControls(FC_ProductPrice,{shopifyProductID:{type:ControlType.String,title:\"Product ID\",description:\"Connect to CMS\"},canvasPrice:{type:ControlType.String,title:\"Price\",description:\"Connect to CMS for canvas preview.\",defaultValue:\"50.00\"},format:{type:ControlType.Object,title:\"Format\",controls:{showSymbol:{type:ControlType.Boolean,title:\"Symbol\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\",description:\"$, \\xa3, €, etc.\"},showCurrency:{type:ControlType.Boolean,title:\"Code\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\",description:\"USD, EUR, CHF, etc.\"},showDecimals:{type:ControlType.Enum,title:\"Decimals\",defaultValue:\"Always show\",options:[\"Always show\",\"Never show\",\"Hide when .00\"],optionTitles:[\"Always show\",\"Never show\",\"Hide when .00\"],displaySegmentedControl:true,segmentedControlDirection:\"vertical\"},currencyCode:{type:ControlType.Enum,title:\"Preview\",defaultValue:\"USD\",options:[\"USD\",\"EUR\",\"GBP\",\"CHF\",\"JPY\",\"CAD\",\"AUD\",\"CNY\",\"HKD\",\"NZD\",\"SEK\",\"KRW\",\"SGD\",\"NOK\",\"MXN\",\"INR\",\"RUB\",\"ZAR\",\"TRY\",\"BRL\",\"TWD\",\"DKK\",\"PLN\",\"THB\",\"IDR\",\"HUF\",\"CZK\",\"ILS\",\"CLP\",\"PHP\",\"AED\",\"COP\",\"SAR\",\"MYR\",\"RON\"],description:\"Currency is for canvas preview only.\"}}},/** Font and Color Controls */regularFont:{type:ControlType.Font,title:\"Regular\",controls:\"extended\"},regularColor:{type:ControlType.Color,title:\"Regular\",defaultValue:\"#000\"},saleFont:{type:ControlType.Font,title:\"Sale\",controls:\"extended\"},saleColor:{type:ControlType.Color,title:\"Sale\",defaultValue:\"#FF0000\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FC_ProductPrice\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FC_ProductPrice.map","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{useRef,useEffect}from\"react\";import{addPropertyControls,ControlType,useAnimation,motion}from\"framer\";import{defaultEvents,useOnEnter,useOnExit}from\"https://framer.com/m/framer/default-utils.js@^0.45.0\";var Indicators;(function(Indicators){Indicators[\"DotWave\"]=\"Dots\";Indicators[\"Material\"]=\"Material\";Indicators[\"IOS\"]=\"iOS\";})(Indicators||(Indicators={}));const angleInRadians=angleInDegrees=>(angleInDegrees-90)*(Math.PI/180);const polarToCartesian=(centerX,centerY,radius,angleInDegrees)=>{const a=angleInRadians(angleInDegrees);return{x:centerX+radius*Math.cos(a),y:centerY+radius*Math.sin(a)};};const arc=(x,y,radius,startAngle,endAngle)=>{const fullCircle=endAngle-startAngle===360;const start=polarToCartesian(x,y,radius,endAngle-0.01);const end=polarToCartesian(x,y,radius,startAngle);const arcFlag=endAngle-startAngle<=180?\"0\":\"1\";let d=[\"M\",start.x,start.y,\"A\",radius,radius,0,arcFlag,0,end.x,end.y,].join(\" \");if(fullCircle)d+=\"z\";return d;};function Spinner({color}){const length=360;const endPercentage=length/360*100;const strokeWidth=10;const width=100;const height=100;return(/*#__PURE__*/ _jsxs(motion.div,{style:{height:\"85%\",width:\"85%\",position:\"relative\",originX:0.5,originY:0.5},animate:{rotate:360},transition:{loop:Infinity,ease:\"linear\",duration:0.5},children:[/*#__PURE__*/ _jsx(motion.svg,{style:{height:\"100%\",width:\"100%\",top:0,left:0,right:0,bottom:0,position:\"absolute\",WebkitMask:`conic-gradient(rgba(0, 0, 0, 0.0) 0%, rgba(0, 0, 0,1.0) ${endPercentage}%)`},viewBox:\"0 0 100 100\",children:/*#__PURE__*/ _jsx(\"g\",{transform:\"translate(0 0)\",children:/*#__PURE__*/ _jsx(\"path\",{d:arc(width/2,height/2,width/2-strokeWidth/2,0,length),fill:\"none\",stroke:color,strokeWidth:strokeWidth,strokeLinecap:\"round\"})})}),/*#__PURE__*/ _jsx(motion.svg,{style:{height:\"100%\",width:\"100%\",position:\"absolute\"},viewBox:\"0 0 100 100\",children:/*#__PURE__*/ _jsx(\"g\",{transform:\"translate(50 0)\",children:/*#__PURE__*/ _jsx(\"path\",{d:\"M 0 0 C 2.761 0 5 2.239 5 5 C 5 7.761 2.761 10 0 10 C 0 10 0 0 0 0 Z\",fill:color})})})]}));}// <path d=\"M 0 0 C 2.761 0 5 2.239 5 5 C 5 7.761 2.761 10 0 10 C 0 10 0 0 0 0 Z\" fill=\"#CCC\"></path>\n// function Spinner({ color }) {\n//     return (\n//         <svg style={{ height: \"85%\", width: \"85%\" }} viewBox=\"0 0 100 100\">\n//             <motion.g\n//                 transform=\"translate(3 3)\"\n//                 animate={{ rotate: 360 }}\n//                 transition={{ loop: Infinity, ease: \"linear\", duration: 1 }}\n//             >\n//                 {pathStrings.map((data, i) => {\n//                     return <path d={data} fill={color} opacity={i / pathStrings.length} />\n//                 })}\n//             </motion.g>\n//         </svg>\n//     )\n// }\nfunction DotWave({color,animation}){const circles=[0,1,2];const{delay,ease,duration,...animProps}=animation;const transition=animation.type===\"spring\"?animProps:{...animProps,ease,duration};// console.log(animProps)\nreturn(/*#__PURE__*/ _jsx(motion.svg,{style:{height:\"85%\",width:\"85%\"},viewBox:\"0 0 30 30\",variants:{show:{transition:{delayChildren:0.1,staggerChildren:0.12}}},animate:\"show\",children:circles.map(circle=>/*#__PURE__*/ _jsx(motion.circle,{style:{fill:color},variants:{hidden:{y:0},show:{y:[0,0,0,-10,0,0,0]}},transition:{...transition,yoyo:Infinity},r:3,cx:circle*10+5,cy:15},circle))}));}function Material({color,animation}){return(/*#__PURE__*/ _jsx(motion.svg,{style:{height:\"85%\",width:\"85%\",overflow:\"visible\",originX:\"50%\",originY:\"50%\"},animate:{rotate:360},transition:{ease:\"linear\",loop:Infinity,duration:2},viewBox:\"25 25 50 50\",children:/*#__PURE__*/ _jsx(motion.circle,{style:{stroke:color,strokeLinecap:\"round\"},animate:{strokeDasharray:[\"1, 200\",\"89, 200\",\"89, 200\"],strokeDashoffset:[0,-35,-124]},transition:{...animation,loop:Infinity,ease:\"easeInOut\"},cx:\"50\",cy:\"50\",r:\"20\",fill:\"none\",strokeWidth:2,strokeMiterlimit:\"10\"})}));}function IOS({color,animation}){const particles=12;// this was the death of me\nconst arrayRotate=(arr,n)=>arr.slice(n,arr.length).concat(arr.slice(0,n));const lines=[...new Array(particles)].map((l,i)=>0.9/particles*i+0.1).reverse();const lineOpacities=lines.map((l,i)=>arrayRotate(lines,i));return(/*#__PURE__*/ _jsx(motion.svg,{viewBox:\"-15 -15 30 30\",style:{width:\"100%\",height:\"100%\"},children:lineOpacities.map((lineKeyframes,i)=>/*#__PURE__*/ _jsx(motion.g,{initial:{opacity:lineKeyframes[0]},animate:{opacity:lineKeyframes},transition:{...animation,loop:Infinity,repeatDelay:0.0005},children:/*#__PURE__*/ _jsx(\"rect\",{style:{width:7,height:2,fill:color,transform:`rotate(${(particles-i)/particles*360-90}deg)`},x:5,y:-1,rx:1})},i))}));}function getIndicator(indicator,props){switch(indicator){case Indicators.DotWave:return(/*#__PURE__*/ _jsx(DotWave,{...props}));case Indicators.Material:return(/*#__PURE__*/ _jsx(Material,{...props}));case Indicators.IOS:return(/*#__PURE__*/ _jsx(IOS,{...props}));// case Indicators.Spinner:\n//     return <Spinner {...props} />\ndefault:return(/*#__PURE__*/ _jsx(DotWave,{...props}));}}export function handleTimeout(duration,callback){const id=setTimeout(callback,duration*1e3);return()=>clearTimeout(id);}/**\n * Loading\n *\n * @framerIntrinsicWidth 40\n * @framerIntrinsicHeight 40\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */ export function Loading(props){const{duration,onTimeout,fadeOut,hasDuration,indicator,onClick,onMouseDown,onMouseUp,onMouseEnter,onMouseLeave,style}=props;const controls=useAnimation();const animDuration=fadeOut?Math.min(duration,0.35):0;const animDelay=fadeOut?duration-animDuration:duration;const currentIndicator=getIndicator(indicator,props);const handlers=useRef([]);const onFadeOut=React.useCallback(()=>{if(hasDuration)controls.start({opacity:0,transition:{duration:animDuration,ease:\"easeIn\"}});},[hasDuration,animDuration]);const resetOpacity=async()=>{controls.set({opacity:1});};useOnEnter(()=>{resetOpacity();if(hasDuration)handlers.current=[handleTimeout(duration,onTimeout),handleTimeout(animDelay,onFadeOut),];});// Cancel all timers on exit.\nuseOnExit(()=>handlers.current.forEach(cleanup=>cleanup));// Cancel all timers on unmount.\nuseEffect(()=>()=>handlers.current.forEach(cleanup=>cleanup),[]);return(/*#__PURE__*/ _jsx(motion.div,{onClick,onMouseDown,onMouseUp,onMouseEnter,onMouseLeave,animate:controls,style:{position:\"relative\",overflow:\"show\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",...style},children:currentIndicator}));}Loading.defaultProps={height:40,width:40,duration:2,color:\"#888\",animation:{type:\"tween\",ease:\"linear\",duration:1.3},hasDuration:false};// Learn more: https://framer.com/api/property-controls/\naddPropertyControls(Loading,{indicator:{title:\"Indicator\",type:ControlType.Enum,options:Object.keys(Indicators).map(i=>Indicators[i])},color:{type:ControlType.Color,defaultValue:\"#888\"},// transition: { title: \"Animation\", type: ControlType.Transition },\nhasDuration:{title:\"Duration\",type:ControlType.Boolean,defaultValue:Loading.defaultProps.hasDuration,enabledTitle:\"Timeout\",disabledTitle:\"Infinity\"},duration:{title:\"Time\",hidden:({hasDuration})=>!hasDuration,min:0.1,max:10,defaultValue:Loading.defaultProps.duration,type:ControlType.Number,step:0.1},animation:{type:ControlType.Transition},fadeOut:{title:\"Fade Out\",hidden:({hasDuration})=>!hasDuration,type:ControlType.Boolean,enabledTitle:\"Yes\",disabledTitle:\"No\"},onTimeout:{type:ControlType.EventHandler},...defaultEvents});\nexport const __FramerMetadata__ = {\"exports\":{\"handleTimeout\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Loading\":{\"type\":\"reactComponent\",\"name\":\"Loading\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"40\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicHeight\":\"40\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Loading.map"],"mappings":"8cAA6V,SAAgB,GAAqB,EAAY,CAAC,IAAM,EAAU,EAAO,WAAW,EAAE,CAAC,GAAG,OAAO,KAAK,EAAU,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