{"version":3,"file":"TableofContent.BlmLzxNE.mjs","names":["React.useState","useState"],"sources":["https:/framerusercontent.com/modules/eFUjhlGIvNjyYdLl2h3y/DXNJEGfdColmyFmcfxY0/AdsBanner.js","https:/framerusercontent.com/modules/EfmP9Fm4ANYa8NWfsXHY/XWUvswIFzKamQwFr9K58/TableofContent.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function RandomImage({image1,link1,image2,link2,image3,link3}){const images=[{src:image1,link:link1},{src:image2,link:link2},{src:image3,link:link3}];const[selected,setSelected]=React.useState(null);React.useEffect(()=>{const randomIndex=Math.floor(Math.random()*images.length);setSelected(images[randomIndex]);},[]);const handleClick=()=>{if(selected?.link){window.location.href=selected.link;}};return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",cursor:\"pointer\"},onClick:handleClick,children:selected?.src&&/*#__PURE__*/_jsx(\"img\",{src:selected.src,alt:\"Random\",style:{width:\"100%\",height:\"100%\",objectFit:\"cover\"}})});}// Add props to Framer UI\naddPropertyControls(RandomImage,{image1:{type:ControlType.Image,title:\"Image 1\"},link1:{type:ControlType.String,title:\"Link 1\"},image2:{type:ControlType.Image,title:\"Image 2\"},link2:{type:ControlType.String,title:\"Link 2\"},image3:{type:ControlType.Image,title:\"Image 3\"},link3:{type:ControlType.String,title:\"Link 3\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RandomImage\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AdsBanner.map","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{ControlType,addPropertyControls}from\"framer\";export function TableOfContents(props){const{richTextId,highlightColor}=props;const[headings,setHeadings]=useState([]);const[activeId,setActiveId]=useState(\"\");const[loading,setLoading]=useState(true);useEffect(()=>{if(!richTextId)return;const container=document.getElementById(richTextId);if(!container)return;const tags=Array.from(container.querySelectorAll(\"h2, h3, h4, h5, h6\"));let insideFAQ=false;const extracted=[];tags.forEach(el=>{const tag=el.tagName.toLowerCase();const level=parseInt(tag.replace(\"h\",\"\"));const text=el.textContent?.trim()||\"\";const isFAQHeading=level===2&&/faq|faqs|frequently asked questions|Frequently Asked Questions/i.test(text);// Enter FAQ section\nif(isFAQHeading){insideFAQ=true;}// Exit FAQ section when next H2 appears\nif(insideFAQ&&level===2&&!isFAQHeading){insideFAQ=false;}// Ignore FAQ sub-headings (h3+)\nif(insideFAQ&&level>2){el.style.pointerEvents=\"none\";el.style.cursor=\"default\";el.style.color=\"#0c0020\";return;}const id=el.id||text.toLowerCase().replace(/[^\\w\\s]/g,\"\").replace(/\\s+/g,\"-\");el.id=id;el.style.pointerEvents=\"none\";el.style.cursor=\"default\";el.style.color=\"#0c0020\";extracted.push({id,text,level});});setHeadings(extracted);setLoading(false);const observer=new IntersectionObserver(entries=>{const visible=entries.filter(e=>e.isIntersecting).sort((a,b)=>a.boundingClientRect.top-b.boundingClientRect.top)[0];if(visible)setActiveId(visible.target.id);},{rootMargin:`-${80}px 0px -60% 0px`,threshold:.1});extracted.forEach(h=>{const el=document.getElementById(h.id);if(el)observer.observe(el);});return()=>observer.disconnect();},[richTextId]);const scrollTo=id=>{const el=document.getElementById(id);if(!el)return;const headerOffset=80// adjust to your sticky header height\n;const elementPosition=el.getBoundingClientRect().top+window.scrollY;const offsetPosition=elementPosition-headerOffset;window.scrollTo({top:offsetPosition,behavior:\"smooth\"});};let h2Count=0;let subCount=0;return /*#__PURE__*/_jsx(\"div\",{style:{fontFamily:\"Plus Jakarta Sans\"},children:loading?/*#__PURE__*/_jsxs(\"div\",{style:{textAlign:\"center\",padding:\"40px 0\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:\"32px\",height:\"32px\",border:`4px solid ${highlightColor}`,borderTop:\"4px solid transparent\",borderRadius:\"50%\",animation:\"spin 1s linear infinite\",margin:\"0 auto\"}}),/*#__PURE__*/_jsx(\"style\",{children:`\n                        @keyframes spin {\n                            0% { transform: rotate(0deg); }\n                            100% { transform: rotate(360deg); }\n                        }\n                    `})]}):/*#__PURE__*/_jsx(\"ul\",{style:{padding:0,margin:0,listStyle:\"none\"},children:headings.map((h,i)=>{const isH2=h.level===2;if(isH2){h2Count++;subCount=0;}else{subCount++;}const label=isH2?`${h2Count}. ${h.text}`:`   ${String.fromCharCode(96+subCount)}. ${h.text}`;return /*#__PURE__*/_jsx(\"li\",{onClick:()=>scrollTo(h.id),style:{cursor:\"pointer\",marginLeft:isH2?0:24,fontWeight:500,fontSize:\"18px\",lineHeight:\"150%\",fontStyle:\"normal\",color:h.id===activeId?highlightColor:\"#0C0020\",marginBottom:12,transition:\"all 0.3s ease\"},onMouseEnter:e=>{if(h.id!==activeId){e.currentTarget.style.color=highlightColor;}},onMouseLeave:e=>{if(h.id!==activeId){e.currentTarget.style.color=\"#0C0020\";}},children:label},i);})})});}addPropertyControls(TableOfContents,{richTextId:{type:ControlType.String,title:\"Rich Text ID\",placeholder:\"e.g. blog-content\"},highlightColor:{type:ControlType.Color,title:\"Highlight Color\",defaultValue:\"#FFD700\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"TableOfContents\":{\"type\":\"reactComponent\",\"name\":\"TableOfContents\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TableofContent.map"],"mappings":"sMAA2H,SAAwB,EAAY,CAAC,SAAO,QAAM,SAAO,QAAM,SAAO,SAAO,CAAC,IAAM,EAAO,CAAC,CAAC,IAAI,EAAO,KAAK,CAAK,EAAE,CAAC,IAAI,EAAO,KAAK,CAAK,EAAE,CAAC,IAAI,EAAO,KAAK,CAAK,CAAC,EAAO,CAAC,EAAS,GAAaA,EAAe,IAAI,EAAwM,OAAtM,MAAoB,CAAC,IAAM,EAAY,KAAK,M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