{"version":3,"file":"ScrollHighlight.C1gQrFEm.mjs","names":["_Fragment"],"sources":["https:/framerusercontent.com/modules/duAJl7x7AxveW6ugLDn9/CggvmovbnSW4O6N0H2q7/ScrollHighlight.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";export function GreenteaHighlightColor(Component){return props=>{const[isVisible,setIsVisible]=useState(false);useEffect(()=>{const elements=document.querySelectorAll(`.${props.className} [style*=\"--framer-text-decoration\"]`);// Now, let's add a parent <mark> tag to the selected elements\nelements.forEach(element=>{element.style.removeProperty(\"--framer-text-decoration\");const markElement=document.createElement(\"mark\");const spanElement=document.createElement(\"span\");// Wrap the element with mark\nelement.parentNode.insertBefore(markElement,element);markElement.appendChild(element);// Wrap the content of the element with span\nwhile(element.firstChild){spanElement.appendChild(element.firstChild);}element.appendChild(spanElement);setIsVisible(true);});const handle=entries=>{entries.forEach(entry=>{const highlightedValue=entry.target.style.getPropertyValue(\"--highlighted\");console.log(\"handle\");if(!highlightedValue||parseInt(highlightedValue)===0){entry.target.style.setProperty(\"--highlighted\",entry.isIntersecting?\"1\":\"0\");}});};const observer=new IntersectionObserver(handle,{threshold:1});elements.forEach(M=>observer.observe(M));},[props]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n.${props.className} mark {\n--highlighted: 0;\n--highlight: rgba(206, 247, 179, 1.0);\nbackground: transparent;\n}\n\n.${props.className} mark span {\nbackground: linear-gradient(0deg, var(--highlight) 50%, transparent 50%) 0% 0 / 200% 100% no-repeat;\nbackground-position: calc((1 - var(--highlighted)) * 200%) 0;\ntransition: background-position 1.5s;\ncolor: inherent;\n}\n`}),/*#__PURE__*/_jsx(Component,{...props,style:!isVisible?{opacity:0}:{}})]});};}export function BlurpleHighlightColor(Component){return props=>{const[isVisible,setIsVisible]=useState(false);useEffect(()=>{const elements=document.querySelectorAll(`.${props.className} [style*=\"--framer-text-decoration\"]`);// Now, let's add a parent <mark> tag to the selected elements\nelements.forEach(element=>{element.style.removeProperty(\"--framer-text-decoration\");const markElement=document.createElement(\"mark\");const spanElement=document.createElement(\"span\");// Wrap the element with mark\nelement.parentNode.insertBefore(markElement,element);markElement.appendChild(element);// Wrap the content of the element with span\nwhile(element.firstChild){spanElement.appendChild(element.firstChild);}element.appendChild(spanElement);setIsVisible(true);});const handle=entries=>{entries.forEach(entry=>{const highlightedValue=entry.target.style.getPropertyValue(\"--highlighted\");console.log(\"handle\");if(!highlightedValue||parseInt(highlightedValue)===0){entry.target.style.setProperty(\"--highlighted\",entry.isIntersecting?\"1\":\"0\");}});};const observer=new IntersectionObserver(handle,{threshold:1});elements.forEach(M=>observer.observe(M));},[props]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n.${props.className} mark {\n--highlighted: 0;\n--highlight: rgba(128, 140, 252, 1.0);\nbackground: transparent;\n}\n\n.${props.className} mark span {\nbackground: linear-gradient(0deg, var(--highlight) 50%, transparent 50%) 0% 0 / 200% 100% no-repeat;\nbackground-position: calc((1 - var(--highlighted)) * 200%) 0;\ntransition: background-position 1.5s;\ncolor: inherent;\n}\n`}),/*#__PURE__*/_jsx(Component,{...props,style:!isVisible?{opacity:0}:{}})]});};}export function UltramarineHighlightColor(Component){return props=>{const[isVisible,setIsVisible]=useState(false);useEffect(()=>{const elements=document.querySelectorAll(`.${props.className} [style*=\"--framer-text-decoration\"]`);// Now, let's add a parent <mark> tag to the selected elements\nelements.forEach(element=>{element.style.removeProperty(\"--framer-text-decoration\");const markElement=document.createElement(\"mark\");const spanElement=document.createElement(\"span\");// Wrap the element with mark\nelement.parentNode.insertBefore(markElement,element);markElement.appendChild(element);// Wrap the content of the element with span\nwhile(element.firstChild){spanElement.appendChild(element.firstChild);}element.appendChild(spanElement);setIsVisible(true);});const handle=entries=>{entries.forEach(entry=>{const highlightedValue=entry.target.style.getPropertyValue(\"--highlighted\");console.log(\"handle\");if(!highlightedValue||parseInt(highlightedValue)===0){entry.target.style.setProperty(\"--highlighted\",entry.isIntersecting?\"1\":\"0\");}});};const observer=new IntersectionObserver(handle,{threshold:1});elements.forEach(M=>observer.observe(M));},[props]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n.${props.className} mark {\n--highlighted: 0;\n--highlight: rgba(22, 5, 67, 1.0);\nbackground: transparent;\n}\n\n.${props.className} mark span {\nbackground: linear-gradient(0deg, var(--highlight) 50%, transparent 50%) 0% 0 / 200% 100% no-repeat;\nbackground-position: calc((1 - var(--highlighted)) * 200%) 0;\ntransition: background-position 1.5s;\ncolor: inherent;\n}\n`}),/*#__PURE__*/_jsx(Component,{...props,style:!isVisible?{opacity:0}:{}})]});};}\nexport const __FramerMetadata__ = {\"exports\":{\"BlurpleHighlightColor\":{\"type\":\"reactHoc\",\"name\":\"BlurpleHighlightColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"UltramarineHighlightColor\":{\"type\":\"reactHoc\",\"name\":\"UltramarineHighlightColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"GreenteaHighlightColor\":{\"type\":\"reactHoc\",\"name\":\"GreenteaHighlightColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrollHighlight.map"],"mappings":"iLAAqH,SAAgB,EAAuB,EAAU,CAAC,MAAO,CAAA,GAAO,CAAC,GAAK,CAAC,EAAU,EAAa,CAAC,GAAS,EAAM,CAGuS,MAHtS,GAAU,IAAI,CAAC,IAAM,EAAS,SAAS,kBAAkB,GAAG,EAAM,UAAU,sCAAsC,CACtV,EAAS,QAAQ,GAAS,CAAC,EAAQ,MAAM,eAAe,2BAA2B,CAAC,IAAM,EAAY,SAAS,cAAc,OAAO,CAAO,EAAY,SAAS,cAAc,OAAO,CAErL,IADA,EAAQ,WAAW,aAAa,EAAY,EAAQ,CAAC,EA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