{"version":3,"file":"Highlight.BaDFP8dw.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/6U8ucT5uFMYKMwau8ihN/O4d0Bdd6GyMVVFI783L3/Highlight.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useRef,useEffect}from\"react\";export function withHighlight(Component){return props=>{const ref=useRef(null);useEffect(()=>{if(!ref.current){return;}const items=[...ref.current.getElementsByTagName(\"a\")];items.forEach(item=>{if(item.href.includes(\"highlight-mock\")){const highlight=document.createElement(\"mark\");let backgroundColor=item.href.split(\"highlight-mock\")[1].replace(/\\//gi,\"\");if(!backgroundColor.startsWith(\"#\")){backgroundColor=backgroundColor.replace(\"#\",\"\");}item.childNodes.forEach(node=>{highlight.appendChild(node);});highlight.style.color=\"inherit\";highlight.style.backgroundColor=backgroundColor;item.parentElement.replaceChild(highlight,item);}});},[ref.current]);return /*#__PURE__*/ _jsx(Component,{...props,ref:ref});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withHighlight\":{\"type\":\"reactHoc\",\"name\":\"withHighlight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Highlight.map"],"mappings":"yHAA+E,SAAgB,EAAc,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAIA,EAAO,KAAK,CAAkkB,OAAjkB,MAAc,CAAK,EAAI,SAA6B,CAAC,GAAG,EAAI,QAAQ,qBAAqB,IAAI,CAAC,CAAO,QAAQ,GAAM,CAAC,GAAG,EAAK,KAAK,SAAS,iBAAiB,CAAC,CAAC,IAAM,EAAU,SAAS,cAAc,OAAO,CAAK,EAAgB,EAAK,KAAK,MAAM,iBAAiB,CAAC,GAAG,QAAQ,OAAO,GAAG,CAAK,EAAgB,WAAW,IAAI,GAAE,EAAgB,EAAgB,QAAQ,IAAI,GAAG,EAAE,EAAK,WAAW,QAAQ,GAAM,CAAC,EAAU,YAAY,EAAK,EAAG,CAAC,EAAU,MAAM,MAAM,UAAU,EAAU,MAAM,gBAAgB,EAAgB,EAAK,cAAc,aAAa,EAAU,EAAK,GAAI,EAAG,CAAC,EAAI,QAAQ,CAAC,CAAsB,EAAK,EAAU,CAAC,GAAG,EAAU,MAAI,CAAC,mBAA3uB,IAAoC"}