{"version":3,"file":"TableOfContent.DhO2ni8D.mjs","names":["React.useContext","React.useMemo","React.Fragment","useRef","React.useId","sharedStyle.className","className","sharedStyle.css","sharedStyle.fonts","useStore","useState","children","useRef","useState","useCallback","Component"],"sources":["https:/framerusercontent.com/modules/Ks2yeHEXQYqQlc2cMwgw/Es2YBmXpMOy5WVtvmW88/o7khfHN4e.js","https:/framer.com/m/framer/store.js@^1.0.0","https:/framer.com/m/Utils-WIyM.js","https:/framerusercontent.com/modules/SweN8YEYtQh8g9NsjC5Q/SFzTs8x3UJetcxROzFNI/TableOfContent.js"],"sourcesContent":["// Generated by Framer (6ae4e96)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addFonts,addPropertyControls,ControlType,cx,getFontsFromSharedStyle,Link,RichText,useComponentViewport,useLocaleInfo,useVariantState,withCSS}from\"framer\";import{LayoutGroup,motion,MotionConfigContext}from\"framer-motion\";import*as React from\"react\";import{useRef}from\"react\";import*as sharedStyle from\"https://framerusercontent.com/modules/GRaLLREJkVTmwYSQ2sMX/V7J0zOC3FJhh9pEfox9W/hwuZzyMNl.js\";const cycleOrder=[\"l5iGwrncO\",\"BOx7JfQ9Q\",\"o_DUEUQVM\"];const serializationHash=\"framer-mwP3V\";const variantClassNames={BOx7JfQ9Q:\"framer-v-153y3nz\",l5iGwrncO:\"framer-v-1ixvbiv\",o_DUEUQVM:\"framer-v-74xizm\"};function addPropertyOverrides(overrides,...variants){const nextOverrides={};variants?.forEach(variant=>variant&&Object.assign(nextOverrides,overrides[variant]));return nextOverrides;}const transition1={bounce:.2,delay:0,duration:.4,type:\"spring\"};const Transition=({value,children})=>{const config=React.useContext(MotionConfigContext);const transition=value??config.transition;const contextValue=React.useMemo(()=>({...config,transition}),[JSON.stringify(transition)]);return /*#__PURE__*/_jsx(MotionConfigContext.Provider,{value:contextValue,children:children});};const Variants=motion.create(React.Fragment);const humanReadableVariantMap={h1:\"l5iGwrncO\",h2:\"BOx7JfQ9Q\",h3:\"o_DUEUQVM\"};const getProps=({height,id,link,title,width,...props})=>{return{...props,hDfdKbFSv:title??props.hDfdKbFSv??\"More than competitor tracking – A full LinkedIn analytics solution\",ildKtv__J:link??props.ildKtv__J,variant:humanReadableVariantMap[props.variant]??props.variant??\"l5iGwrncO\"};};const createLayoutDependency=(props,variants)=>{if(props.layoutDependency)return variants.join(\"-\")+props.layoutDependency;return variants.join(\"-\");};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const fallbackRef=useRef(null);const refBinding=ref??fallbackRef;const defaultLayoutId=React.useId();const{activeLocale,setLocale}=useLocaleInfo();const componentViewport=useComponentViewport();const{style,className,layoutId,variant,hDfdKbFSv,ildKtv__J,...restProps}=getProps(props);const{baseVariant,classNames,clearLoadingGesture,gestureHandlers,gestureVariant,isLoading,setGestureState,setVariant,variants}=useVariantState({cycleOrder,defaultVariant:\"l5iGwrncO\",ref:refBinding,variant,variantClassNames});const layoutDependency=createLayoutDependency(props,variants);const sharedStyleClassNames=[sharedStyle.className];const scopingClassNames=cx(serializationHash,...sharedStyleClassNames);return /*#__PURE__*/_jsx(LayoutGroup,{id:layoutId??defaultLayoutId,children:/*#__PURE__*/_jsx(Variants,{animate:variants,initial:false,children:/*#__PURE__*/_jsx(Transition,{value:transition1,children:/*#__PURE__*/_jsx(motion.div,{...restProps,...gestureHandlers,className:cx(scopingClassNames,\"framer-1ixvbiv\",className,classNames),\"data-framer-name\":\"h1\",layoutDependency:layoutDependency,layoutId:\"l5iGwrncO\",ref:refBinding,style:{...style},...addPropertyOverrides({BOx7JfQ9Q:{\"data-framer-name\":\"h2\"},o_DUEUQVM:{\"data-framer-name\":\"h3\"}},baseVariant,gestureVariant),children:/*#__PURE__*/_jsx(RichText,{__fromCanvasComponent:true,children:/*#__PURE__*/_jsx(React.Fragment,{children:/*#__PURE__*/_jsx(motion.p,{style:{\"--font-selector\":\"R0Y7R2Vpc3QtNjAw\",\"--framer-font-family\":'\"Geist\", \"Geist Placeholder\", sans-serif',\"--framer-font-weight\":\"600\",\"--framer-letter-spacing\":\"-0.02em\",\"--framer-text-color\":\"var(--extracted-r6o4lv, var(--token-ca29c13c-df4f-400a-b171-f1824fa0d498, rgb(23, 23, 23)))\"},children:/*#__PURE__*/_jsx(Link,{href:ildKtv__J,motionChild:true,nodeId:\"Wzrb30dnE\",openInNewTab:false,relValues:[],scopeId:\"o7khfHN4e\",smoothScroll:true,children:/*#__PURE__*/_jsx(motion.a,{className:\"framer-styles-preset-emupzg\",\"data-styles-preset\":\"hwuZzyMNl\",children:\"More than competitor tracking – A full LinkedIn analytics solution\"})})})}),className:\"framer-ou8mfu\",fonts:[\"GF;Geist-600\"],layoutDependency:layoutDependency,layoutId:\"Wzrb30dnE\",style:{\"--extracted-r6o4lv\":\"var(--token-ca29c13c-df4f-400a-b171-f1824fa0d498, rgb(23, 23, 23))\"},text:hDfdKbFSv,verticalAlignment:\"top\",withExternalLayout:true,...addPropertyOverrides({BOx7JfQ9Q:{children:/*#__PURE__*/_jsx(React.Fragment,{children:/*#__PURE__*/_jsx(motion.p,{style:{\"--font-selector\":\"R0Y7R2Vpc3QtNjAw\",\"--framer-font-family\":'\"Geist\", \"Geist Placeholder\", sans-serif',\"--framer-font-size\":\"14px\",\"--framer-font-weight\":\"600\",\"--framer-letter-spacing\":\"-0.02em\",\"--framer-text-color\":\"var(--extracted-r6o4lv, var(--token-ca29c13c-df4f-400a-b171-f1824fa0d498, rgb(23, 23, 23)))\"},children:/*#__PURE__*/_jsx(Link,{href:ildKtv__J,motionChild:true,nodeId:\"Wzrb30dnE\",openInNewTab:false,relValues:[],scopeId:\"o7khfHN4e\",smoothScroll:true,children:/*#__PURE__*/_jsx(motion.a,{className:\"framer-styles-preset-emupzg\",\"data-styles-preset\":\"hwuZzyMNl\",children:\"More than competitor tracking – A full LinkedIn analytics solution\"})})})})},o_DUEUQVM:{children:/*#__PURE__*/_jsx(React.Fragment,{children:/*#__PURE__*/_jsx(motion.p,{style:{\"--font-selector\":\"R0Y7R2Vpc3QtNjAw\",\"--framer-font-family\":'\"Geist\", \"Geist Placeholder\", sans-serif',\"--framer-font-size\":\"14px\",\"--framer-font-weight\":\"600\",\"--framer-letter-spacing\":\"-0.02em\",\"--framer-text-color\":\"var(--extracted-r6o4lv, var(--token-ca29c13c-df4f-400a-b171-f1824fa0d498, rgb(23, 23, 23)))\"},children:/*#__PURE__*/_jsx(Link,{href:ildKtv__J,motionChild:true,nodeId:\"Wzrb30dnE\",openInNewTab:false,relValues:[],scopeId:\"o7khfHN4e\",smoothScroll:true,children:/*#__PURE__*/_jsx(motion.a,{className:\"framer-styles-preset-emupzg\",\"data-styles-preset\":\"hwuZzyMNl\",children:\"More than competitor tracking – A full LinkedIn analytics solution\"})})})})}},baseVariant,gestureVariant)})})})})});});const css=[\"@supports (aspect-ratio: 1) { body { --framer-aspect-ratio-supported: auto; } }\",\".framer-mwP3V.framer-1fcg5fk, .framer-mwP3V .framer-1fcg5fk { display: block; }\",\".framer-mwP3V.framer-1ixvbiv { align-content: flex-start; align-items: flex-start; display: flex; flex-direction: column; flex-wrap: nowrap; gap: 10px; height: min-content; justify-content: flex-start; min-width: 250px; overflow: hidden; padding: 6px 6px 6px 0px; position: relative; width: min-content; }\",\".framer-mwP3V .framer-ou8mfu { flex: none; height: auto; position: relative; white-space: pre-wrap; width: 240px; word-break: break-word; word-wrap: break-word; }\",\".framer-mwP3V.framer-v-74xizm.framer-1ixvbiv { padding: 6px 10px 6px 10px; }\",...sharedStyle.css];/**\n * This is a generated Framer component.\n * @framerIntrinsicHeight 50\n * @framerIntrinsicWidth 250\n * @framerCanvasComponentVariantDetails {\"propertyName\":\"variant\",\"data\":{\"default\":{\"layout\":[\"auto\",\"auto\"],\"constraints\":[\"250px\",null,null,null]},\"BOx7JfQ9Q\":{\"layout\":[\"auto\",\"auto\"],\"constraints\":[\"250px\",null,null,null]},\"o_DUEUQVM\":{\"layout\":[\"auto\",\"auto\"],\"constraints\":[\"250px\",null,null,null]}}}\n * @framerVariables {\"hDfdKbFSv\":\"title\",\"ildKtv__J\":\"link\"}\n * @framerImmutableVariables true\n * @framerDisplayContentsDiv false\n * @framerAutoSizeImages true\n * @framerComponentViewportWidth true\n * @framerColorSyntax true\n */const Framero7khfHN4e=withCSS(Component,css,\"framer-mwP3V\");export default Framero7khfHN4e;Framero7khfHN4e.displayName=\"Table of content\";Framero7khfHN4e.defaultProps={height:50,width:250};addPropertyControls(Framero7khfHN4e,{variant:{options:[\"l5iGwrncO\",\"BOx7JfQ9Q\",\"o_DUEUQVM\"],optionTitles:[\"h1\",\"h2\",\"h3\"],title:\"Variant\",type:ControlType.Enum},hDfdKbFSv:{defaultValue:\"More than competitor tracking – A full LinkedIn analytics solution\",title:\"Title\",type:ControlType.String},ildKtv__J:{title:\"Link\",type:ControlType.Link}});addFonts(Framero7khfHN4e,[{explicitInter:true,fonts:[{family:\"Geist\",source:\"google\",style:\"normal\",url:\"https://fonts.gstatic.com/s/geist/v3/gyBhhwUxId8gMGYQMKR3pzfaWI_RQuQ4mJPby1QNtA.woff2\",weight:\"600\"}]},...getFontsFromSharedStyle(sharedStyle.fonts)],{supportsExplicitInterCodegen:true});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Framero7khfHN4e\",\"slots\":[],\"annotations\":{\"framerComponentViewportWidth\":\"true\",\"framerContractVersion\":\"1\",\"framerCanvasComponentVariantDetails\":\"{\\\"propertyName\\\":\\\"variant\\\",\\\"data\\\":{\\\"default\\\":{\\\"layout\\\":[\\\"auto\\\",\\\"auto\\\"],\\\"constraints\\\":[\\\"250px\\\",null,null,null]},\\\"BOx7JfQ9Q\\\":{\\\"layout\\\":[\\\"auto\\\",\\\"auto\\\"],\\\"constraints\\\":[\\\"250px\\\",null,null,null]},\\\"o_DUEUQVM\\\":{\\\"layout\\\":[\\\"auto\\\",\\\"auto\\\"],\\\"constraints\\\":[\\\"250px\\\",null,null,null]}}}\",\"framerDisplayContentsDiv\":\"false\",\"framerIntrinsicHeight\":\"50\",\"framerImmutableVariables\":\"true\",\"framerVariables\":\"{\\\"hDfdKbFSv\\\":\\\"title\\\",\\\"ildKtv__J\\\":\\\"link\\\"}\",\"framerIntrinsicWidth\":\"250\",\"framerColorSyntax\":\"true\",\"framerAutoSizeImages\":\"true\"}},\"Props\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./o7khfHN4e.map","import{useState,useEffect}from\"react\";import{Data,useObserveData}from\"framer\";export function createStore(state1){// Use Data so that a Preview reload resets the state\nconst dataStore=Data({state:Object.freeze({...state1})});// Create a set function that updates the state\nconst setDataStore=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(dataStore.state);}dataStore.state=Object.freeze({...dataStore.state,...newState});};// Store the initial state, copy the object if it's an object\nlet storeState=typeof state1===\"object\"?Object.freeze({...state1}):state1;// Keep a list of all the listeners, in the form of React hook setters\nconst storeSetters=new Set();// Create a set function that updates all the listeners / setters\nconst setStoreState=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(storeState);}storeState=typeof newState===\"object\"?Object.freeze({...storeState,...newState}):newState;// Update all the listeners / setters with the new value\nstoreSetters.forEach(setter=>setter(storeState));};// Create the actual hook based on everything above\nfunction useStore(){// Create the hook we are going to use as a listener\nconst[state,setState]=useState(storeState);// If we unmount the component using this hook, we need to remove the listener\n// @ts-ignore\nuseEffect(()=>{// But right now, we need to add the listener\nstoreSetters.add(setState);return()=>storeSetters.delete(setState);},[]);// If Data context exists, use Data, otherwise use vanilla React state\nif(useObserveData()===true){useObserveData();return[dataStore.state,setDataStore];}else{// Return the state and a function to update the central store\nreturn[state,setStoreState];}}return useStore;}\nexport const __FramerMetadata__ = {\"exports\":{\"createStore\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./createStore.map","export const HEADINGS=[\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\"];const formatHeading=(children,index)=>{let formattedHeading=\"\";let formattedId=\"\";if(typeof children===\"string\"){formattedHeading=children;}else if(Array.isArray(children)){formattedHeading=children.map(item=>{var _item_props;if(typeof item===\"string\")return item.trim();if(typeof((_item_props=item.props)===null||_item_props===void 0?void 0:_item_props.children)===\"string\")return item.props.children.trim();}).join(\" \");}else if(typeof children===\"object\"){if(typeof children.props.children===\"string\"){formattedHeading=children.props.children;}else{formattedHeading=children.type;}}else{formattedHeading=index.toString();}formattedId=formattedHeading.toLowerCase().replace(/[^a-z0-9]+/g,\"-\").replace(/^-+|-+$/g,\"\").trim();return{formattedId,formattedHeading};};export const formatTableOfContent=children=>{const result=[];children.length>0&&children.filter(({type})=>HEADINGS.includes(type)).map((item,index)=>{const children=item.props.children;const{formattedId,formattedHeading}=formatHeading(children,index);result.push({id:formattedId,heading:formattedHeading,type:item.type,originalIndex:index});});return result;};export const formatHeadings=props=>{const newChildren=[];props.children.props.children.forEach((item,index)=>{const children=item.props.children;if(HEADINGS.includes(item.type)){const{formattedId}=formatHeading(children,index);// Create a new object for the modified item\nconst newItem={...item,props:{...item.props,id:formattedId}};newChildren.push(newItem);}else{newChildren.push(item);}});// Return a new props object with the modified children\nreturn{...props,children:{...props.children,props:{...props.children.props,children:newChildren}}};};\nexport const __FramerMetadata__ = {\"exports\":{\"formatTableOfContent\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"HEADINGS\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"formatHeadings\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Utils.map","\"use client\";import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";import{useEffect,useCallback,useRef,useState}from\"react\";import{formatHeadings,formatTableOfContent}from\"https://framer.com/m/Utils-WIyM.js\";// Only include h1, h2, h3 as requested\nconst HEADING_TO_DISPLAY=[\"h1\",\"h2\",\"h3\"];const NAVBAR_HEIGHT=85;const SCROLL_MARGIN_TOP=NAVBAR_HEIGHT+10;// Content selectors - target elements that likely contain the CMS content field\nconst CONTENT_SELECTORS=[\".content-field\",\".cms-content\",\".content-body\",\".post-content\",\".article-content\",'[data-content-field=\"body\"]','[data-content-field=\"content\"]','[data-content-field=\"main-content\"]',\".sqs-block-content\",\".main-content\",\".entry-content\",\".page-content\",\"article .content\",\".wysiwyg-content\",\".rich-text-content\"];// Selectors for elements to exclude (title and CTA)\nconst EXCLUDE_SELECTORS=[// Title selectors\n\".page-title\",\".entry-title\",\".post-title\",\".article-title\",\".title\",\"h1.title\",// CTA selectors\n\".cta\",\".call-to-action\",\".subscribe\",\".newsletter\",\".contact-form\",\".signup-form\",// Footer selectors that might contain CTAs\n\"footer\",\".footer\",\".site-footer\"];const useStore=createStore({headings:[],activeHeading:null,activeIndex:0,lastScrollTop:0,indicatorPosition:0,currentPath:typeof window!==\"undefined\"?window.location.pathname:\"\",pageType:\"\"});// Helper function to detect the page type based on URL or content\nconst detectPageType=()=>{const path=window.location.pathname;// Check URL patterns to identify page types\nif(path.includes(\"blog\")||path.includes(\"article\")||path.includes(\"post\")){return\"blog\";}else if(path.includes(\"product\")||path.includes(\"shop\")){return\"product\";}else if(path.includes(\"about\")||path.includes(\"contact\")){return\"info\";}// Check content to identify page types\nif(document.querySelector(\".blog-post, .article, .post\")){return\"blog\";}else if(document.querySelector(\".product, .shop-item\")){return\"product\";}return\"general\";};// Helper function to find the content container based on page type\nconst findContentContainer=pageType=>{// Page-specific selectors\nconst pageSelectors={blog:\".blog-content, .post-content, .article-body, article .content\",product:\".product-description, .product-content, .product-details\",info:\".page-content, .info-content\",general:CONTENT_SELECTORS.join(\", \")};// Try page-specific selectors first\nif(pageType&&pageSelectors[pageType]){const container=document.querySelector(pageSelectors[pageType]);if(container){console.log(`Found content container with page-specific selector for ${pageType} page`);return container;}}// Try general content selectors\nfor(const selector of CONTENT_SELECTORS){const container=document.querySelector(selector);if(container){console.log(`Found content container with selector: ${selector}`);return container;}}// Fallback: look for the element with the most headings\n// but exclude elements that match the exclude selectors\nconst excludeSelector=EXCLUDE_SELECTORS.join(\", \");const allContentElements=Array.from(document.querySelectorAll(\"div, article, section, main\")).filter(el=>{// Skip elements that match exclude selectors\nif(el.matches(excludeSelector)||el.querySelector(excludeSelector)){return false;}// Skip elements that are likely not content\nconst isHeader=el.tagName===\"HEADER\"||el.classList.contains(\"header\")||el.getAttribute(\"role\")===\"banner\";const isFooter=el.tagName===\"FOOTER\"||el.classList.contains(\"footer\")||el.getAttribute(\"role\")===\"contentinfo\";const isNav=el.tagName===\"NAV\"||el.classList.contains(\"nav\")||el.classList.contains(\"navigation\")||el.getAttribute(\"role\")===\"navigation\";return!isHeader&&!isFooter&&!isNav;});let bestContainer=null;let maxHeadings=0;allContentElements.forEach(el=>{const headingCount=el.querySelectorAll(\"h1, h2, h3\").length;if(headingCount>maxHeadings){maxHeadings=headingCount;bestContainer=el;}});if(bestContainer&&maxHeadings>0){console.log(`Found content container with ${maxHeadings} headings`);return bestContainer;}console.log(\"Could not find specific content container, using document body\");return document.body;};// Helper function to find headings in the content field only\nconst findHeadingsInContent=pageType=>{const contentContainer=findContentContainer(pageType);if(!contentContainer){console.log(\"No content container found\");return[];}// Only get h1, h2, h3 as requested\nconst allHeadingElements=Array.from(contentContainer.querySelectorAll(\"h1, h2, h3\"));// Create a combined selector for elements to exclude\nconst excludeSelector=EXCLUDE_SELECTORS.join(\", \");// Filter out headings that should be excluded\nconst filteredHeadings=allHeadingElements.filter(el=>{// Exclude headings that match exclude selectors or are inside excluded elements\nconst isExcluded=el.matches(excludeSelector)||el.closest(excludeSelector);// Exclude the first h1 if it's likely to be the title\nconst isFirstH1=el.tagName===\"H1\"&&Array.from(document.querySelectorAll(\"h1\")).indexOf(el)===0;// Exclude headings with subscription-related text\nconst hasSubscribeText=el.textContent?.toLowerCase().includes(\"subscribe\")||el.textContent?.toLowerCase().includes(\"sign up\")||el.textContent?.toLowerCase().includes(\"newsletter\")||el.textContent?.toLowerCase().includes(\"don't forget\");// Only include the heading if it passes all filters\nreturn!isExcluded&&!isFirstH1&&!hasSubscribeText;});console.log(`Found ${filteredHeadings.length} heading elements in content container:`,filteredHeadings);const formattedHeadings=filteredHeadings.map((el,index)=>{// Generate an ID if the element doesn't have one\nif(!el.id){el.id=`${index}`;}return{id:el.id,heading:el.textContent||\"\",type:el.tagName.toLowerCase(),originalIndex:index};});console.log(\"Formatted content headings:\",formattedHeadings);return formattedHeadings;};export function withTableOfContent(Component){return props=>{const[store,setStore]=useStore();const componentRef=useRef(null);const[hasAttemptedContentFetch,setHasAttemptedContentFetch]=useState(false);const[hoveredIndex,setHoveredIndex]=useState(null);// Update store with current page URL and detect page type\nuseEffect(()=>{if(typeof window!==\"undefined\"&&store.currentPath!==window.location.pathname){const pageType=detectPageType();setStore({currentPath:window.location.pathname,headings:[],activeHeading:null,activeIndex:0,lastScrollTop:0,indicatorPosition:0,pageType:pageType});setHasAttemptedContentFetch(false);console.log(`Detected page type: ${pageType}`);}},[store.currentPath,setStore]);// Find headings in the content field\nuseEffect(()=>{if(store.headings.length===0&&!hasAttemptedContentFetch){// Wait for the DOM to be fully rendered\nconst timer=setTimeout(()=>{const contentHeadings=findHeadingsInContent(store.pageType);if(contentHeadings.length>0){setStore(prev=>({...prev,headings:contentHeadings}));}else{console.log(\"Failed to find headings in content\");}setHasAttemptedContentFetch(true);},1500)// Wait 1.5 seconds for DOM to be ready\n;return()=>clearTimeout(timer);}},[store.headings,hasAttemptedContentFetch,setStore,store.pageType]);const updateIndicatorPosition=useCallback(()=>{if(componentRef.current){const activeElement=componentRef.current.querySelector(`[data-active=\"true\"]`);if(activeElement){setStore({indicatorPosition:activeElement.offsetTop+activeElement.clientHeight/2-15});}}},[setStore]);// Smooth Scroll Using `scrollIntoView()`\nconst handleClick=useCallback((e,id,index)=>{e.preventDefault();e.stopPropagation()// Stop event propagation to prevent interference\n;const element=document.getElementById(id);if(element){// Calculate the scroll position with the navbar height taken into account\nconst elementPosition=element.getBoundingClientRect().top+window.pageYOffset;const offsetPosition=elementPosition-SCROLL_MARGIN_TOP;// Scroll to the element with the offset\nwindow.scrollTo({top:offsetPosition,behavior:\"smooth\"});document.documentElement.style.scrollPaddingTop=`${SCROLL_MARGIN_TOP}px`;setTimeout(()=>{setStore({activeHeading:id,activeIndex:index});updateIndicatorPosition();},150);}else{// Try to find the element by text content instead\nconst headingText=store.headings[index]?.heading;const contentContainer=findContentContainer(store.pageType);const headingElements=contentContainer.querySelectorAll(\"h1, h2, h3\");const matchingElement=Array.from(headingElements).find(el=>el.textContent===headingText);if(matchingElement){// Set an ID on the element for future reference\nif(!matchingElement.id){matchingElement.id=id;}// Calculate the scroll position with the navbar height taken into account\nconst elementPosition=matchingElement.getBoundingClientRect().top+window.pageYOffset;const offsetPosition=elementPosition-SCROLL_MARGIN_TOP;// Scroll to the element with the offset\nwindow.scrollTo({top:offsetPosition,behavior:\"smooth\"});setTimeout(()=>{setStore({activeHeading:matchingElement.id,activeIndex:index});updateIndicatorPosition();},150);}}},[setStore,updateIndicatorPosition,store.headings,store.pageType]);// Scroll Listener - Updates Active Section\nuseEffect(()=>{const handleScroll=()=>{if(!store.headings||store.headings.length===0)return;const headings=store.headings.filter(({type})=>HEADING_TO_DISPLAY.includes(type)).sort((a,b)=>a.originalIndex-b.originalIndex);let newActiveHeading=store.activeHeading;let newActiveIndex=store.activeIndex;let closestHeading=null;let closestDistance=Number.POSITIVE_INFINITY;let closestIndex=-1;// Find the heading closest to the scroll position\nfor(let i=0;i<headings.length;i++){const element=document.getElementById(headings[i].id);if(!element)continue;const rect=element.getBoundingClientRect();// Calculate distance from the element to the scroll margin\nconst distance=Math.abs(rect.top-SCROLL_MARGIN_TOP);// If this heading is closer than the previous closest, update\nif(distance<closestDistance){closestDistance=distance;closestHeading=headings[i].id;closestIndex=i;}// If the heading is at or just past the scroll margin, it's active\nif(rect.top<=SCROLL_MARGIN_TOP&&rect.bottom>=SCROLL_MARGIN_TOP){newActiveHeading=headings[i].id;newActiveIndex=i;break;}}// If no heading is exactly at the scroll margin, use the closest one\nif(newActiveHeading===store.activeHeading&&closestHeading){newActiveHeading=closestHeading;newActiveIndex=closestIndex;}if(newActiveHeading!==store.activeHeading){setStore({activeHeading:newActiveHeading,activeIndex:newActiveIndex});// Update the indicator position immediately when the active heading changes\nsetTimeout(updateIndicatorPosition,10);}};window.addEventListener(\"scroll\",handleScroll);return()=>window.removeEventListener(\"scroll\",handleScroll);},[store.headings,store.activeHeading,setStore,store.activeIndex,updateIndicatorPosition]);// Ensure TOC Always Loads & Never Disappears\nuseEffect(()=>{if(props.headings?.length>0&&store.headings.length===0){// Filter to only include h1, h2, h3 and exclude title and CTA\nconst filteredHeadings=props.headings.filter(heading=>{// Only include h1, h2, h3\nif(!HEADING_TO_DISPLAY.includes(heading.type))return false;// Exclude likely title (first h1)\nconst isFirstH1=heading.type===\"h1\"&&heading.originalIndex===0;// Exclude likely CTA headings\nconst isCta=heading.heading.toLowerCase().includes(\"subscribe\")||heading.heading.toLowerCase().includes(\"sign up\")||heading.heading.toLowerCase().includes(\"newsletter\")||heading.heading.toLowerCase().includes(\"don't forget\");return!isFirstH1&&!isCta;});setStore({headings:filteredHeadings});}},[props.headings,setStore,store.headings.length]);useEffect(()=>{updateIndicatorPosition();},[store.activeIndex,updateIndicatorPosition]);// Add CSS to the document for hover effects\nuseEffect(()=>{if(typeof document!==\"undefined\"){// Create a style element\nconst styleEl=document.createElement(\"style\");// Add the hover styles with enhanced easing\nstyleEl.innerHTML=`\n          .toc-item {\n            transition: opacity 0.3s ease, color 0.3s ease, font-weight 0.3s ease;\n            transform: translateX(0);\n            transition-property: transform, opacity, color;\n            transition-duration: 0.3s, 0.3s, 0.3s;\n            transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1), ease, ease;\n            cursor: pointer;\n          }\n          .toc-item:hover {\n            transform: translateX(2px);\n            opacity: 1 !important;\n            color: #000 !important;\n          }\n        `;// Append the style element to the head\ndocument.head.appendChild(styleEl);// Clean up on unmount\nreturn()=>{document.head.removeChild(styleEl);};}},[]);return /*#__PURE__*/_jsxs(\"div\",{ref:componentRef,style:{position:\"relative\",paddingLeft:\"8px\",zIndex:1,pointerEvents:\"none\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",left:\"-8px\",top:0,width:\"1px\",height:\"100%\",backgroundColor:\"rgba(0,0,0,0.1)\",pointerEvents:\"none\"}}),store.headings.length>0&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",left:\"-8px\",top:`${store.indicatorPosition}px`,width:\"2px\",height:\"30px\",backgroundColor:\"#171717\",transition:\"top 0.3s cubic-bezier(0.25, 1, 0.5, 1)\",pointerEvents:\"none\"}}),!store.headings||store.headings.length===0?/*#__PURE__*/_jsx(\"div\",{style:{color:\"#999\",fontSize:\"14px\",pointerEvents:\"auto\",position:\"relative\",zIndex:1},children:\"Loading table of contents...\"}):store.headings.map((heading,index)=>/*#__PURE__*/_jsx(Component,{variant:heading.type,title:heading.heading,link:`${window.location.pathname}#${heading.id}`,onClick:e=>handleClick(e,heading.id,index),style:{fontWeight:store.activeHeading===heading.id?\"bold\":\"normal\",opacity:store.activeHeading===heading.id?1:.5,color:\"#171717\",transition:\"opacity 0.3s ease, font-weight 0.3s ease\",pointerEvents:\"auto\",position:\"relative\",zIndex:2,display:\"block\",marginBottom:\"8px\",whiteSpace:\"normal\",wordWrap:\"break-word\",overflowWrap:\"break-word\",maxWidth:\"100%\",lineHeight:\"1.4\",paddingRight:\"8px\"},\"data-active\":store.activeHeading===heading.id?\"true\":\"false\",className:\"toc-item\"},heading.id))]});};}export function withContent(Component){return props=>{const[store,setStore]=useStore();const[newProps,setNewProps]=useState(props);const[hasExtractedHeadings,setHasExtractedHeadings]=useState(false);// Update store with current page URL and detect page type\nuseEffect(()=>{if(typeof window!==\"undefined\"&&store.currentPath!==window.location.pathname){const pageType=detectPageType();setStore({currentPath:window.location.pathname,headings:[],activeHeading:null,activeIndex:0,lastScrollTop:0,indicatorPosition:0,pageType:pageType});setHasExtractedHeadings(false);console.log(`Detected page type: ${pageType}`);}},[store.currentPath,setStore]);useEffect(()=>{if(hasExtractedHeadings)return;try{// Only extract headings if we haven't already\nconst allHeadings=formatTableOfContent(newProps.children.props.children);console.log(\"All extracted headings:\",allHeadings);// Filter to only include h1, h2, h3 and exclude title and CTA\nconst filteredHeadings=allHeadings.filter(heading=>{// Only include h1, h2, h3\nif(!HEADING_TO_DISPLAY.includes(heading.type))return false;// Exclude likely title (first h1)\nconst isFirstH1=heading.type===\"h1\"&&heading.originalIndex===0;// Exclude likely CTA headings\nconst isCta=heading.heading.toLowerCase().includes(\"subscribe\")||heading.heading.toLowerCase().includes(\"sign up\")||heading.heading.toLowerCase().includes(\"newsletter\")||heading.heading.toLowerCase().includes(\"don't forget\");return!isFirstH1&&!isCta;});console.log(\"Filtered headings:\",filteredHeadings);if(filteredHeadings&&filteredHeadings.length>0){setStore(prev=>({...prev,headings:filteredHeadings}));setHasExtractedHeadings(true);}else{// If no headings were found, try the DOM fallback\nconst contentHeadings=findHeadingsInContent(store.pageType);if(contentHeadings.length>0){setStore(prev=>({...prev,headings:contentHeadings}));setHasExtractedHeadings(true);}}setNewProps(formatHeadings(props));}catch(error){console.error(\"Error formatting headings:\",error);// If there's an error, try to extract headings directly from the content\nconst contentHeadings=findHeadingsInContent(store.pageType);if(contentHeadings.length>0){setStore(prev=>({...prev,headings:contentHeadings}));setHasExtractedHeadings(true);}}},[newProps,setStore,props,hasExtractedHeadings,store.pageType]);// Reset extraction state when component unmounts or when URL changes\nuseEffect(()=>{const currentPath=window.location.pathname;const handleRouteChange=()=>{if(currentPath!==window.location.pathname){setHasExtractedHeadings(false);const pageType=detectPageType();setStore({headings:[],activeHeading:null,activeIndex:0,lastScrollTop:0,indicatorPosition:0,currentPath:window.location.pathname,pageType:pageType});}};window.addEventListener(\"popstate\",handleRouteChange);return()=>{window.removeEventListener(\"popstate\",handleRouteChange);};},[setStore]);return /*#__PURE__*/_jsx(Component,{...newProps});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withTableOfContent\":{\"type\":\"reactHoc\",\"name\":\"withTableOfContent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withContent\":{\"type\":\"reactHoc\",\"name\":\"withContent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TableOfContent.map"],"mappings":"20BAC2oB,SAAS,EAAqB,EAAU,GAAG,EAAS,CAAC,IAAM,EAAc,EAAE,CAAsF,OAArF,GAAU,QAAQ,GAAS,GAAS,OAAO,OAAO,EAAc,EAAU,GAAS,CAAC,CAAQ,gDAAxwB,IAAiK,IAAkE,IAA4B,KAAmJ,CAAM,EAAW,CAAC,YAAY,YAAY,YAAY,CAAO,EAAkB,eAAqB,EAAkB,CAAC,UAAU,mBAAmB,UAAU,mBAAmB,UAAU,kBAAkB,CAA8L,EAAY,CAAC,OAAO,GAAG,MAAM,EAAE,SAAS,GAAG,KAAK,SAAS,CAAO,GAAY,CAAC,QAAM,cAAY,CAAC,IAAM,EAAOA,EAAiB,EAAoB,CAAO,EAAW,GAAO,EAAO,WAAiB,EAAaC,OAAmB,CAAC,GAAG,EAAO,aAAW,EAAE,CAAC,KAAK,UAAU,EAAW,CAAC,CAAC,CAAC,OAAoB,EAAK,EAAoB,SAAS,CAAC,MAAM,EAAsB,WAAS,CAAC,EAAS,EAAS,EAAO,OAAOC,EAAe,CAAO,EAAwB,CAAC,GAAG,YAAY,GAAG,YAAY,GAAG,YAAY,CAAO,GAAU,CAAC,SAAO,KAAG,OAAK,QAAM,QAAM,GAAG,MAAgB,CAAC,GAAG,EAAM,UAAU,GAAO,EAAM,WAAW,qEAAqE,UAAU,GAAM,EAAM,UAAU,QAAQ,EAAwB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