{"version":3,"file":"siteMetadata.CFd0LI4e.mjs","names":[],"sources":["https:/framerusercontent.com/modules/o37LlAkrJTidHDAgdkMD/xDpHU5E28PeqGQpJxOdd/siteMetadata.js"],"sourcesContent":["// Generated by Framer (cd22f02)\nexport default function metadata(params,activeLocale){return{customHTMLBodyEnd:\"<script>\\ndocument.addEventListener('DOMContentLoaded', function() {\\n\\n    // Check if ChiliPiper loaded\\n    if (typeof ChiliPiper === 'undefined') {\\n        // do nothing\\n    }\\n\\n    // --- CONFIGURATION ---\\n    const cpTenantDomain = \\\"bubblehouse\\\";\\n    const cpRouterName = \\\"web-inbound\\\";\\n    const storageKey = 'chiliPiperFormState';\\n    let isProcessingSubmission = false;\\n\\n    // --- HELPER FUNCTIONS ---\\n    function getFormData(formContainer) {\\n        const data = {};\\n        const fieldNames = ['firstname', 'lastname', 'email', 'company', 'website'];\\n        fieldNames.forEach(name => {\\n            const input = formContainer.querySelector(`[data-framer-name=\\\"${name}\\\"] input, [data-framer-name=\\\"${name}\\\"] textarea`);\\n            if (input) {\\n                data[name] = input.value;\\n            }\\n        });\\n        return data;\\n    }\\n\\n    function findSubmitButton(container) {\\n        if (!container) return null;\\n        const selectors = [\\n            '[data-framer-name=\\\"submit-button\\\"]',\\n            'button[type=\\\"submit\\\"]',\\n            'button:not([type=\\\"button\\\"])',\\n            'button'\\n        ];\\n        for (const selector of selectors) {\\n            const buttons = container.querySelectorAll(selector);\\n            for (const button of buttons) {\\n                const buttonText = button.textContent.trim().toLowerCase();\\n                if (buttonText.includes('book') || buttonText.includes('demo') || buttonText.includes('submit')) {\\n                    return button;\\n                }\\n            }\\n        }\\n        return container.querySelector('button');\\n    }\\n\\n    // --- MAIN FORM SUBMISSION HANDLER ---\\n    function handleFormSubmission(emailInput, formContainer, triggeredBy) {\\n        // Validate email\\n        const emailValue = emailInput.value.trim();\\n        if (!emailValue || !emailValue.includes('@')) {\\n            alert(\\\"Please enter a valid email address.\\\");\\n            return false;\\n        }\\n\\n        if (isProcessingSubmission) {\\n            return false;\\n        }\\n\\n        isProcessingSubmission = true;\\n\\n        // Get form data\\n        const formData = formContainer ? getFormData(formContainer) : { email: emailValue };\\n\\n        // Let form submit naturally (for webhook), then launch ChiliPiper\\n        setTimeout(() => {\\n            if (typeof ChiliPiper !== 'undefined' && ChiliPiper.submit) {\\n                try {\\n                    ChiliPiper.submit(cpTenantDomain, cpRouterName, {\\n                        title: \\\"Thanks! What day works best?\\\",\\n                        map: true,\\n                        lead: formData\\n                    });\\n                } catch (error) {\\n                    window.open('https://www.bubblehouse.com/book-a-demo', '_blank');\\n                }\\n            } else {\\n                window.open('https://www.bubblehouse.com/book-a-demo', '_blank');\\n            }\\n\\n            // Clear email-only forms\\n            if (!formContainer || !formContainer.querySelector('[data-framer-name=\\\"firstname\\\"]')) {\\n                emailInput.value = '';\\n            }\\n            sessionStorage.removeItem(storageKey);\\n\\n            setTimeout(() => {\\n                isProcessingSubmission = false;\\n            }, 1000);\\n        }, 500);\\n\\n        return true;\\n    }\\n\\n    // --- FORM DATA PERSISTENCE ---\\n    document.body.addEventListener('input', function(event) {\\n        const formContainer = event.target.closest('[data-framer-name=\\\"chili-piper-form\\\"]');\\n        if (formContainer) {\\n            const formData = getFormData(formContainer);\\n            sessionStorage.setItem(storageKey, JSON.stringify(formData));\\n        }\\n    });\\n\\n    // --- RESTORE FORM DATA ---\\n    const observer = new MutationObserver(function(mutations) {\\n        mutations.forEach(function(mutation) {\\n            mutation.addedNodes.forEach(function(node) {\\n                if (node.nodeType === 1 && node.matches('[data-framer-name=\\\"chili-piper-form\\\"]')) {\\n                    const formContainer = node;\\n                    const savedData = JSON.parse(sessionStorage.getItem(storageKey));\\n                    if (savedData) {\\n                        const restoreValues = () => {\\n                            Object.keys(savedData).forEach(name => {\\n                                const input = formContainer.querySelector(`[data-framer-name=\\\"${name}\\\"] input, [data-framer-name=\\\"${name}\\\"] textarea`);\\n                                if (input && savedData[name] && input.value !== savedData[name]) {\\n                                    input.value = savedData[name];\\n                                    const inputEvent = new Event('input', { bubbles: true, cancelable: true });\\n                                    input.dispatchEvent(inputEvent);\\n                                }\\n                            });\\n                        };\\n                        setTimeout(restoreValues, 50);\\n                        setTimeout(restoreValues, 150);\\n                        setTimeout(restoreValues, 400);\\n                    }\\n                }\\n            });\\n        });\\n    });\\n    observer.observe(document.body, { childList: true, subtree: true });\\n\\n    // --- INTERCEPT ENTER KEY ON FORMS ---\\n    document.addEventListener('keydown', function(event) {\\n        if (event.key === 'Enter' && event.target.tagName === 'INPUT') {\\n            const form = event.target.closest('form');\\n            const formContainer = event.target.closest('[data-framer-name=\\\"chili-piper-form\\\"]');\\n            const isEmailInput = event.target.type === 'email' ||\\n                                event.target.placeholder?.toLowerCase().includes('email') ||\\n                                event.target.name === 'email';\\n            if (formContainer || isEmailInput || form) {\\n                // Find email input\\n                let emailInput = event.target;\\n                if (!emailInput.value || !emailInput.value.includes('@')) {\\n                    // If current input is not email, find the email input\\n                    if (formContainer) {\\n                        emailInput = formContainer.querySelector('[data-framer-name=\\\"email\\\"] input');\\n                    } else if (form) {\\n                        emailInput = form.querySelector('input[type=\\\"email\\\"]') ||\\n                                   form.querySelector('input[placeholder*=\\\"email\\\" i]') ||\\n                                   form.querySelector('input[name=\\\"email\\\"]');\\n                    }\\n                }\\n                if (emailInput && emailInput.value && emailInput.value.includes('@')) {\\n                    // Only prevent default if we have a valid email\\n                    event.preventDefault();\\n                    event.stopPropagation();\\n                    // Trigger our handler\\n                    const handled = handleFormSubmission(emailInput, formContainer, 'Enter key');\\n                    // If handled successfully, also submit the form for webhook\\n                    if (handled && form) {\\n                        // Submit form after a tiny delay to ensure our handler runs first\\n                        setTimeout(() => {\\n                            const submitEvent = new Event('submit', { bubbles: true, cancelable: false });\\n                            form.dispatchEvent(submitEvent);\\n                        }, 100);\\n                    }\\n                }\\n            }\\n        }\\n    }, true); // Use capture phase\\n\\n    // --- HANDLE BUTTON CLICKS ---\\n    document.body.addEventListener('click', function(event) {\\n        const target = event.target;\\n        const isSubmitButton =\\n            target.closest('[data-framer-name=\\\"submit-button\\\"]') ||\\n            (target.tagName === 'BUTTON' && target.textContent.trim().toLowerCase().includes('book a demo')) ||\\n            (target.parentElement?.tagName === 'BUTTON' && target.parentElement.textContent.trim().toLowerCase().includes('book a demo')) ||\\n            (target.closest('button') && target.closest('button').textContent.trim().toLowerCase().includes('book a demo'));\\n\\n        if (!isSubmitButton) {\\n            return;\\n        }\\n\\n        // Find email input and form container\\n        let emailInput = null;\\n        let formContainer = null;\\n\\n        formContainer = target.closest('[data-framer-name=\\\"chili-piper-form\\\"]');\\n\\n        if (!formContainer) {\\n            const stackParent = target.closest('[data-framer-component-type=\\\"Stack\\\"]');\\n            if (stackParent) {\\n                formContainer = stackParent.querySelector('[data-framer-name=\\\"chili-piper-form\\\"]');\\n            }\\n        }\\n\\n        if (formContainer) {\\n            emailInput = formContainer.querySelector('[data-framer-name=\\\"email\\\"] input');\\n        } else {\\n            const searchContainers = [\\n                target.closest('form'),\\n                target.parentElement?.parentElement?.parentElement,\\n                target.closest('.framer-component-wrapper'),\\n                target.closest('[data-framer-component-type]'),\\n                document.querySelector('[data-framer-name=\\\"Form\\\"]'),\\n                document.body\\n            ];\\n            for (const container of searchContainers) {\\n                if (!container) continue;\\n                emailInput = container.querySelector('input[type=\\\"email\\\"]') ||\\n                            container.querySelector('input[placeholder*=\\\"email\\\" i]') ||\\n                            container.querySelector('input[name=\\\"email\\\"]') ||\\n                            container.querySelector('input[type=\\\"text\\\"]');\\n                if (emailInput) {\\n                    break;\\n                }\\n            }\\n        }\\n\\n        if (!emailInput) {\\n            return;\\n        }\\n\\n        // Use the same handler function\\n        handleFormSubmission(emailInput, formContainer, 'Button click');\\n    });\\n\\n});\\n</script>\\n\\n<!-- Plugin: 33d9eb --> <script type=\\\"text/javascript\\\" id=\\\"hs-script-loader\\\" async=\\\"\\\" defer=\\\"\\\" src=\\\"//js-eu1.hs-scripts.com/23765377.js\\\"></script>\",customHTMLHeadEnd:\"  <!-- Clearbit Script (this might 404 but won't affect other scripts) -->\\n  <script src=\\\"https://tag.clearbitscripts.com/v1/pk_ed08aaa1162485a8ef8146b099e7878f/tags.js\\\" referrerpolicy=\\\"strict-origin-when-cross-origin\\\"></script>\\n  \\n  <!-- Google Tag Manager -->\\n  <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':\\n  new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\\n  j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=\\n  'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);\\n  })(window,document,'script','dataLayer','GTM-T65TRGLF');</script>\\n  <!-- End Google Tag Manager -->\\n  \\n  <!-- Start of HubSpot Embed Code -->\\n  <script type=\\\"text/javascript\\\" id=\\\"hs-script-loader\\\" async=\\\"\\\" src=\\\"//js.hs-scripts.com/23765377.js\\\"></script>\\n  <!-- End of HubSpot Embed Code -->\\n  \\n  <!-- ChiliPiper Script (moved from body) -->\\n  <script src=\\\"https://js.chilipiper.com/marketing.js\\\" type=\\\"text/javascript\\\"></script>\\n  \\n  <!-- Solution 1 that fixed your HubSpot forms -->\\n  <script>\\n  (function() {\\n    function getCookie(name) {\\n      var match = document.cookie.match(new RegExp('(^|; )' + name + '=([^;]*)'));\\n      return match ? decodeURIComponent(match[2]) : '';\\n    }\\n    \\n    function attachFormHandler(form) {\\n      if (form.dataset.handlerAttached) return;\\n      \\n      form.dataset.handlerAttached = 'true';\\n      \\n      form.addEventListener('submit', function(e) {\\n        var values = {\\n          pageuri: document.location.href,\\n          title: document.title,\\n          hubspotutk: getCookie('hubspotutk')\\n        };\\n        \\n        for (var key in values) {\\n          if (values.hasOwnProperty(key)) {\\n            var input = this.querySelector('[name=\\\"' + key + '\\\"]');\\n            if (input) {\\n              input.value = values[key] || '';\\n            }\\n          }\\n        }\\n      });\\n    }\\n    \\n    function onReady(fn) {\\n      if (document.readyState === \\\"loading\\\") {\\n        document.addEventListener(\\\"DOMContentLoaded\\\", fn);\\n      } else {\\n        fn();\\n      }\\n    }\\n    \\n    onReady(function() {\\n      var forms = document.querySelectorAll('form');\\n      forms.forEach(attachFormHandler);\\n      \\n      var observer = new MutationObserver(function(mutations) {\\n        mutations.forEach(function(mutation) {\\n          mutation.addedNodes.forEach(function(node) {\\n            if (node.nodeName === 'FORM') {\\n              attachFormHandler(node);\\n            }\\n            if (node.querySelectorAll) {\\n              var forms = node.querySelectorAll('form');\\n              forms.forEach(attachFormHandler);\\n            }\\n          });\\n        });\\n      });\\n      \\n      observer.observe(document.body, {\\n        childList: true,\\n        subtree: true\\n      });\\n    });\\n  })();\\n  </script>\",description:\"Boost customer retention with Bubblehouse's loyalty and rewards programs. Explore tiered rewards and personalized perks. Request a demo today!\",favicon:\"https://framerusercontent.com/assets/6EL5AbakE5W1ZIWpSlT6fa900.png\",robots:\"max-image-preview:large\",socialImage:\"https://framerusercontent.com/assets/M8s2wJ6SZYdDGGGMyFDDrPGQGw.jpg\",title:\"Customer Loyalty & Rewards Programs | Bubblehouse\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"2DACA,SAAwB,EAAS,EAAO,EAAa,CAAC,MAAM,CAAC,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qJAA++T,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAk1F,YAAY,iJAAiJ,QAAQ,qEAAqE,OAAO,0BAA0B,YAAY,sEAAsE,MAAM,oDAAoD"}