{"version":3,"file":"shared-lib.BP_QfHXk.mjs","names":[],"sources":["https:/framerusercontent.com/modules/qBvoYCQCEmg1EIY4ok1Y/LSobuX4GwLWVGWqtTnTc/siteMetadata.js"],"sourcesContent":["// Generated by Framer (dc3a148)\nexport default function metadata(params,activeLocale){return{customHTMLBodyEnd:'<script>\\n// Wrap everything in an IIFE to avoid polluting globals\\n(function () {\\n  // 1. Define a reusable function to track page views\\n  function trackLandingPageView() {\\n    if (!window.amplitude) return;\\n\\n    const loglineLink = document.querySelector(\\'a[name=\"logline_click\"]\\');\\n\\n    if (loglineLink) {\\n        loglineLink.addEventListener(\"click\", function (event) {\\n            event.preventDefault(); // Prevent default navigation\\n\\n            // Find the nearest input field (assuming it\\'s within the same container)\\n            const inputField = document.querySelector(\\'input\\');\\n\\n            const eventData = {\\n                component: \"generate\",\\n                option: \"180s 16x9\",\\n            };\\n\\n            // Add the text field if input exists and has a value\\n            if (inputField && inputField.value.trim() !== \"\") {\\n                eventData.text = inputField.value.trim();\\n            }\\n\\n            if (window.amplitude) {\\n                amplitude.track(\"logline_click\", eventData).promise.then(function () {\\n                    window.location.href = loglineLink.href; // Navigate after tracking\\n                });\\n            } else {\\n                window.location.href = loglineLink.href; // Fallback if Amplitude is unavailable\\n            }\\n        });\\n    }\\n                    \\n    const featureContainers = document.querySelectorAll(\\'div[data-framer-name^=\"page_click_feature_home_\"]\\');\\n    \\n    featureContainers.forEach(container => {\\n        container.addEventListener(\"mouseover\", function () {\\n            const link = container.querySelector(\"a\");\\n\\n            if (link && !link.dataset.trackingAdded) {\\n                link.dataset.trackingAdded = \"true\"; // Prevent duplicate listeners\\n\\n                link.addEventListener(\"click\", function (event) {\\n                    event.preventDefault();\\n\\n                    const featureName = container.getAttribute(\"data-framer-name\").replace(\"page_click_feature_home_\", \"\");\\n                    \\n                    const eventData = {\\n                        component: \"feature\",\\n                        page: \"home\",\\n                        name: featureName.replace(/_/g, \" \") // Convert underscores to spaces\\n                    };\\n\\n                    if (window.amplitude) {\\n                        amplitude.track(\"landing_page_click\", eventData).promise.then(function(){\\n                            window.location.href = link.href; // Ensure navigation happens after tracking\\n                        });\\n                    } else {\\n                        window.location.href = link.href; // Fallback navigation if Amplitude isn\\'t available\\n                    }\\n                });\\n            }\\n        });\\n    });\\n\\n    // Rebuild the logic you already use:\\n    function getUTMParam(name) {\\n      const urlParams = new URLSearchParams(window.location.search);\\n      return urlParams.get(name);\\n    }\\n\\n    function getSource() {\\n      return document.referrer && document.referrer !== \"\" ? document.referrer : \"direct\";\\n    }\\n\\n    function getPageName() {\\n      const pathParts = window.location.pathname.split(\"/\").filter(Boolean);\\n      return pathParts.length > 0 ? pathParts[pathParts.length - 1] : \"home\";\\n    }\\n\\n    const eventData = {\\n      utm_source: getUTMParam(\"utm_source\"),\\n      utm_medium: getUTMParam(\"utm_medium\"),\\n      utm_campaign: getUTMParam(\"utm_campaign\"),\\n      source: getSource(),\\n      referral: getUTMParam(\"referral\"),\\n      page: getPageName(),\\n    };\\n\\n    // Fire your landing_page_view event\\n    amplitude.track(\"landing_page_view\", eventData);\\n  }\\n\\n  // 2. On first page load, track it once\\n  document.addEventListener(\"DOMContentLoaded\", trackLandingPageView);\\n\\n  // 3. Override pushState and replaceState so we can detect route changes\\n  (function(history) {\\n    const originalPushState = history.pushState;\\n    history.pushState = function() {\\n      const result = originalPushState.apply(history, arguments);\\n      window.dispatchEvent(new Event(\"locationchange\"));\\n      return result;\\n    };\\n\\n    const originalReplaceState = history.replaceState;\\n    history.replaceState = function() {\\n      const result = originalReplaceState.apply(history, arguments);\\n      window.dispatchEvent(new Event(\"locationchange\"));\\n      return result;\\n    };\\n  })(window.history);\\n\\n  // 4. Also watch for back/forward (popstate)\\n  window.addEventListener(\"popstate\", () => {\\n    window.dispatchEvent(new Event(\"locationchange\"));\\n  });\\n\\n  // 5. Whenever locationchange fires, do the same tracking\\n  window.addEventListener(\"locationchange\", trackLandingPageView);\\n\\n\\n  // 6. Your existing click logic can stay the same if you want:\\n  document.body.addEventListener(\"click\", function (event) {\\n    let target = event.target.closest(\"[data-framer-name]\");\\n    while (target) {\\n      const framerName = target.getAttribute(\"data-framer-name\");\\n      if (framerName && framerName.startsWith(\"page_click_\")) {\\n        const parts = framerName.split(\"_\");\\n        if (parts.length >= 4) {\\n          const component = parts[2];\\n          const page = parts[3];\\n          const name = target.innerText.trim() || null;\\n          const eventData = { component, page, name };\\n\\n          console.log(\"Tracking landing_page_click:\", eventData);\\n          if (window.amplitude) {\\n            amplitude.track(\"landing_page_click\", eventData).promise.then(() => console.log(\"COMPLETED\"));\\n          }\\n\\n          break;\\n        }\\n      }\\n      target = target.parentElement;\\n    }\\n  });\\n})();\\n\\ndocument.addEventListener(\"DOMContentLoaded\", function () {\\n    console.log(\"Watching for video element with specific src...\");\\n\\n    let startTimeMap = new Map(); // Store start times for each video\\n\\n    function trackVideoPlay(video, start, end) {\\n        const eventData = {\\n            start_time: start,\\n            end_time: end\\n        };\\n\\n        if (window.amplitude) {\\n            amplitude.track(\"demo_video_play\", eventData);\\n        }\\n        console.log(\"Tracked video play:\", eventData);\\n    }\\n\\n    function attachVideoListeners(video) {\\n        if (!video.dataset.trackingAttached) { // Ensure the listener is attached only once\\n            video.dataset.trackingAttached = \"true\";\\n\\n            video.addEventListener(\"play\", function () {\\n                if (!startTimeMap.has(video)) {\\n                    startTimeMap.set(video, video.currentTime);\\n                }\\n                console.log(\"Video started at:\", startTimeMap.get(video));\\n            });\\n\\n            video.addEventListener(\"pause\", function () {\\n                if (startTimeMap.has(video)) {\\n                    const endTime = video.currentTime;\\n                    trackVideoPlay(video, startTimeMap.get(video), endTime);\\n                    startTimeMap.delete(video); // Reset for next play session\\n                }\\n            });\\n\\n            video.addEventListener(\"ended\", function () {\\n                if (startTimeMap.has(video)) {\\n                    trackVideoPlay(video, startTimeMap.get(video), video.duration);\\n                    startTimeMap.delete(video);\\n                }\\n            });\\n        }\\n    }\\n\\n    // Function to find the specific video and attach listeners\\n    function checkForVideo() {\\n        const video = document.querySelector(\\'video[src=\"https://xgjzloifyvgpbmyonaya.supabase.co/storage/v1/object/public/files/xAZYolT20W/original\"]\\');\\n        if (video) {\\n            attachVideoListeners(video);\\n        }\\n    }\\n\\n    // Observe the DOM for added video elements\\n    const observer = new MutationObserver(() => {\\n        checkForVideo();\\n    });\\n\\n    observer.observe(document.body, { childList: true, subtree: true });\\n\\n    // Initial check in case the video is already present\\n    checkForVideo();\\n});\\n\\ndocument.addEventListener(\\'DOMContentLoaded\\', function() {\\n  const featureContainers = document.querySelectorAll(\\'div[data-framer-name^=\"page_click_feature_home_\"]\\');\\n    featureContainers.forEach((container) => {\\n    let hoverStartTime = 0;\\n\\n    // Track when the user enters (starts hovering)\\n    container.addEventListener(\\'mouseenter\\', () => {\\n      hoverStartTime = Date.now();\\n    });\\n\\n    // Track when the user leaves (ends hovering)\\n    container.addEventListener(\\'mouseleave\\', () => {\\n      const hoverEndTime = Date.now();\\n      const hoverDuration = (hoverEndTime - hoverStartTime) / 1000; // in seconds\\n\\n      // Extract the feature name from the data-framer-name attribute\\n      const nameAttribute = container.getAttribute(\\'data-framer-name\\');\\n      const featureName = nameAttribute.replace(\\'page_click_feature_home_\\', \\'\\');\\n\\n      // Construct the payload\\n      const payload = {\\n        component: \\'feature\\',\\n        name: featureName,\\n        duration: hoverDuration,\\n      };\\n\\n      // Log to console or send to your analytics endpoint\\n      console.log(\\'Tracked hover event:\\', payload);\\n      amplitude.track(\"landing_page_hover\", payload)\\n\\n    });\\n  });\\n})\\n\\n\\n\\n</script>\\n',customHTMLBodyStart:\"<script src=\\\"https://cdn.amplitude.com/script/a4f16a6afd7da4da81d1da0bde9a46cf.js\\\"></script>\\n \\n<script>\\n  window.amplitude.init('a4f16a6afd7da4da81d1da0bde9a46cf', {\\n    fetchRemoteConfig: true,\\n    autocapture: false\\n  });\\n</script>\",description:\"Meet Higgsfield - cinematic video generation model with dynamic motion control\",favicon:\"https://framerusercontent.com/assets/zxRfKMgt9YwHXcQKtYyrLOS1OA.png\",robots:\"max-image-preview:large\",socialImage:\"https://framerusercontent.com/assets/gwm0X7RdE2hie6xo7tXCUjYUJw.png\",title:\"Higgsfield AI | News\"};}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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAigS,oBAAoB;;;;;;;YAAqP,YAAY,iFAAiF,QAAQ,sEAAsE,OAAO,0BAA0B,YAAY,sEAAsE,MAAM,uBAAuB"}