{"version":3,"file":"Text_Highlight.A1UbNKmU.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/6TDmap5Nc1xxFH4dsFYq/ssHRKfFxEtKl3jgh6UQl/Text_Highlight.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";export function withHighlightColor1(Component){return props=>{const[isVisible,setIsVisible]=useState(false);useEffect(()=>{const elements=document.querySelectorAll(`.${props.className} [style*=\"--framer-text-decoration\"]`);elements.forEach(element=>{element.style.removeProperty(\"--framer-text-decoration\");const markElement=document.createElement(\"mark\");const spanElement=document.createElement(\"span\");element.parentNode.insertBefore(markElement,element);markElement.appendChild(element);while(element.firstChild){spanElement.appendChild(element.firstChild);}element.appendChild(spanElement);setIsVisible(true);});const handle=entries=>{entries.forEach(entry=>{const highlightedValue=entry.target.style.getPropertyValue(\"--highlighted\");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: #4eb3a9;\n  background: transparent;\n  display: inline-block;\n}\n\n.${props.className} mark span {\n  display: inline-block;\n  padding: 0 0.15em;\n  border-radius: 3px;\n  background: linear-gradient(120deg, var(--highlight) 50%, transparent 50%) \n              110% 0 / 200% 100% no-repeat;\n  background-position: calc((1 - var(--highlighted)) * 110%) 0;\n  transition: background-position 0.55s cubic-bezier(0.4, 0, 0.2, 1);\n  color: white;\n  -webkit-text-fill-color: white;\n}\n`}),/*#__PURE__*/_jsx(Component,{...props,style:!isVisible?{opacity:0}:{}})]});};}export function withHighlightColor2(Component){return props=>{const[isVisible,setIsVisible]=useState(false);useEffect(()=>{const elements=document.querySelectorAll(`.${props.className} [style*=\"--framer-text-decoration\"]`);elements.forEach(element=>{element.style.removeProperty(\"--framer-text-decoration\");const markElement=document.createElement(\"mark\");const spanElement=document.createElement(\"span\");element.parentNode.insertBefore(markElement,element);markElement.appendChild(element);while(element.firstChild){spanElement.appendChild(element.firstChild);}element.appendChild(spanElement);setIsVisible(true);});const handle=entries=>{entries.forEach(entry=>{const highlightedValue=entry.target.style.getPropertyValue(\"--highlighted\");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: #FF784B;\n  background: transparent;\n  display: inline-block;\n}\n\n.${props.className} mark span {\n  display: inline-block;\n  padding: 0 0.15em;\n  border-radius: 3px;\n  background: linear-gradient(120deg, var(--highlight) 50%, transparent 50%) \n              110% 0 / 200% 100% no-repeat;\n  background-position: calc((1 - var(--highlighted)) * 110%) 0;\n  transition: background-position 0.55s cubic-bezier(0.4, 0, 0.2, 1);\n  color: white;\n  -webkit-text-fill-color: white;\n}\n`}),/*#__PURE__*/_jsx(Component,{...props,style:!isVisible?{opacity:0}:{}})]});};}export function withHighlightColor3(Component){return props=>{const[isVisible,setIsVisible]=useState(false);useEffect(()=>{const elements=document.querySelectorAll(`.${props.className} [style*=\"--framer-text-decoration\"]`);elements.forEach(element=>{element.style.removeProperty(\"--framer-text-decoration\");const markElement=document.createElement(\"mark\");const spanElement=document.createElement(\"span\");element.parentNode.insertBefore(markElement,element);markElement.appendChild(element);while(element.firstChild){spanElement.appendChild(element.firstChild);}element.appendChild(spanElement);setIsVisible(true);});const handle=entries=>{entries.forEach(entry=>{const highlightedValue=entry.target.style.getPropertyValue(\"--highlighted\");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: #20233A;\n  background: transparent;\n  display: inline-block;\n}\n\n.${props.className} mark span {\n  display: inline-block;\n  padding: 0 0.15em;\n  border-radius: 3px;\n  background: linear-gradient(120deg, var(--highlight) 50%, transparent 50%) \n              110% 0 / 200% 100% no-repeat;\n  background-position: calc((1 - var(--highlighted)) * 110%) 0;\n  transition: background-position 0.55s cubic-bezier(0.4, 0, 0.2, 1);\n  color: white;\n  -webkit-text-fill-color: white;\n}\n`}),/*#__PURE__*/_jsx(Component,{...props,style:!isVisible?{opacity:0}:{}})]});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withHighlightColor1\":{\"type\":\"reactHoc\",\"name\":\"withHighlightColor1\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHighlightColor3\":{\"type\":\"reactHoc\",\"name\":\"withHighlightColor3\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHighlightColor2\":{\"type\":\"reactHoc\",\"name\":\"withHighlightColor2\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Text_Highlight.map"],"mappings":"uIAAqH,SAAgB,EAAoB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAU,GAAcA,EAAS,EAAK,EAAs3B,OAAp3B,MAAc,CAAC,IAAM,EAAS,SAAS,iBAAiB,IAAI,EAAM,UAAU,qCAAqC,EAAE,EAAS,QAAQ,GAAS,CAAC,EAAQ,MAAM,eAAe,0BAA0B,EAAE,IAAM,EAAY,SAAS,cAAc,MAAM,EAAQ,EAAY,SAAS,cAAc,MAAM,EAAwF,IAAtF,EAAQ,WAAW,aAAa,EAAY,CAAO,EAAE,EAA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