{"version":3,"file":"UtilityOverrides.BONflHGT.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/0n8lAoZmGIKTGOSrztxX/3ICW8qoV9KwbOy10QAKH/UtilityOverrides.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useLayoutEffect,useRef,useState}from\"react\";// Learn more: https://www.framer.com/docs/guides/overrides/\nexport function withLogProps(Component){return props=>{console.log(props);return /*#__PURE__*/_jsx(Component,{...props,className:\"Test log props\",onClick:console.log(\"Hello World\",props.link)});};}export function withABVariantButton(Component){const STORAGE_KEY=\"current-variant-homepage-vertical-type\";return props=>{const[buttonText,setButtonText]=useState(\"Learn more\");const containerRef=useRef(null);function stripParams(url){return url.split(/[?#]/)[0];}const linkToTextMapping={\"/solutions/private-equity\":\"Explore PE solutions\",\"/solutions/ma-advisors\":\"Explore M&A solutions\",\"/solutions/consultants\":\"Explore Consultants solutions\",\"/solutions/strategy-ma\":\"Explore Corporate M&A solutions\",\"/solutions/law-firms\":\"Explore Law Firms solutions\",\"/solutions/executive-search\":\"Explore Executive Search solutions\"};const onButtonClick=()=>{if(Array.isArray(window.dataLayer)){let variant=localStorage.getItem(STORAGE_KEY);window.dataLayer.push({event:`homepage_vertical_solution_button_click_${props?.link?variant:\"A\"}`,event_category:\"Homepage vertical solution button click\",event_label:`Variant ${variant}`,non_interaction:true});}};useLayoutEffect(()=>{if(props?.link){// 1. Get or set the variant in localStorage\nlet variant=localStorage.getItem(STORAGE_KEY);if(!variant){variant=\"A\";localStorage.setItem(STORAGE_KEY,variant);}// 2. Target the text element deep inside the Framer component\nif(containerRef.current){const textElement=containerRef.current.querySelector(\".framer-text\");if(textElement){// 3. Directly update the text content based on the variant\ntextElement.textContent=variant===\"B\"?linkToTextMapping[stripParams(props?.link)]||\"Learn more\":\"Learn more\";if(Array.isArray(window.dataLayer)){let variant=localStorage.getItem(STORAGE_KEY);window.dataLayer.push({event:`homepage_vertical_solution_button_render_${props?.link?variant:\"A\"}`,event_category:\"Homepage vertical solution button render\",event_label:`Variant ${variant}`,non_interaction:true});}}}}},[props?.link])// Runs once on mount\n;return /* display: contents ensures this wrapper doesn't break Framer's styles *//*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{...props,onClick:onButtonClick})});};}export function withLifeAtGainProCarouselNavigationPosition(Component){return props=>{// 1. We attach the ref to a wrapper <div> we control, guaranteeing it's never null\nconst containerRef=useRef(null);const isTablet=window?.innerWidth<=1199;useLayoutEffect(()=>{const container=containerRef.current;if(!container)return;// --- A. Set Container to Relative ---\n// The wrapper div becomes the boundary for absolute positioning\ncontainer.style.position=\"relative\";// Optional: Ensure the container fills space so the layout doesn't collapse\ncontainer.style.height=\"100%\";container.style.width=\"100%\";// --- B. Find the Buttons ---\n// We search inside our container. Since Component is a child,\n// querySelector will find its buttons.\nconst prevBtn=container.querySelector('button[aria-label=\"Previous\"]');const nextBtn=container.querySelector('button[aria-label=\"Next\"]');if(!prevBtn||!nextBtn)return;// Prevention: Check if wrapper already exists to avoid duplication\nif(prevBtn.parentNode.getAttribute(\"data-nav-wrapper\"))return;// --- C. Create the Button Wrapper ---\nconst navWrapper=document.createElement(\"div\");navWrapper.setAttribute(\"data-nav-wrapper\",\"true\");// --- D. Style: Absolute Bottom Left + Gap ---\nObject.assign(navWrapper.style,{position:\"absolute\",bottom:\"0px\",left:isTablet?\"-374px\":\"-410px\",display:\"flex\",gap:\"16px\",padding:\"12px\",zIndex:\"100\"});// --- E. Move Buttons ---\nnavWrapper.appendChild(prevBtn);navWrapper.appendChild(nextBtn);container.appendChild(navWrapper);},[]);return(// We wrap Component in a div so we can reliably attach the ref\n/*#__PURE__*/_jsx(\"div\",{ref:containerRef,className:\"hoc-wrapper\",children:/*#__PURE__*/_jsx(Component,{...props,className:\"Test log props\",// Fixed the console.log to run on click, not on render\nonClick:()=>console.log(\"Hello World\",props.link)})}));};}export function withCarouselBottomLeftPosition(Component){return props=>{// 1. We attach the ref to a wrapper <div> we control, guaranteeing it's never null\nconst containerRef=useRef(null);useLayoutEffect(()=>{const container=containerRef.current;if(!container)return;// --- A. Set Container to Relative ---\n// The wrapper div becomes the boundary for absolute positioning\ncontainer.style.position=\"relative\";// Optional: Ensure the container fills space so the layout doesn't collapse\ncontainer.style.height=\"100%\";container.style.width=\"100%\";// --- B. Find the Buttons ---\n// We search inside our container. Since Component is a child,\n// querySelector will find its buttons.\nconst prevBtn=container.querySelector('button[aria-label=\"Previous\"]');const nextBtn=container.querySelector('button[aria-label=\"Next\"]');if(!prevBtn||!nextBtn)return;// Prevention: Check if wrapper already exists to avoid duplication\nif(prevBtn.parentNode.getAttribute(\"data-nav-wrapper\"))return;// --- C. Create the Button Wrapper ---\nconst navWrapper=document.createElement(\"div\");navWrapper.setAttribute(\"data-nav-wrapper\",\"true\");// --- D. Style: Absolute Bottom Left + Gap ---\nObject.assign(navWrapper.style,{position:\"absolute\",bottom:\"0px\",left:\"0px\",display:\"flex\",gap:\"16px\",padding:\"12px\",zIndex:\"100\"});// --- E. Move Buttons ---\nnavWrapper.appendChild(prevBtn);navWrapper.appendChild(nextBtn);container.appendChild(navWrapper);},[]);return(// We wrap Component in a div so we can reliably attach the ref\n/*#__PURE__*/_jsx(\"div\",{ref:containerRef,className:\"hoc-wrapper\",children:/*#__PURE__*/_jsx(Component,{...props,className:\"Test log props\",// Fixed the console.log to run on click, not on render\nonClick:()=>console.log(\"Hello World\",props.link)})}));};}export function withHiddenContent(Component){return props=>{const cardCount=3;function hideChildrenCardWhenExceedsTheCount(){const filterElements=document.querySelectorAll(\".filter-cms-content-resource\");filterElements.forEach(parentNode=>{if(!parentNode)return;const children=Array.from(parentNode.children).filter(child=>!child.classList.contains(\"no-results-message\"));children.forEach((filterElement,index)=>{filterElement.style.display=index<cardCount?\"\":\"none\";});});}useLayoutEffect(()=>{hideChildrenCardWhenExceedsTheCount();},[]);return /*#__PURE__*/_jsx(Component,{...props});};}export function withFilterContent(Component){return props=>{const clsName=`${props.className} search-text-resource`;return /*#__PURE__*/_jsx(Component,{...props,className:clsName});};}export function withFilterContainer(Component){return props=>{const newCls=`${props.className} filter-cms-content-resource`;return /*#__PURE__*/_jsx(Component,{...props,className:newCls});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withLogProps\":{\"type\":\"reactHoc\",\"name\":\"withLogProps\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCarouselBottomLeftPosition\":{\"type\":\"reactHoc\",\"name\":\"withCarouselBottomLeftPosition\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLifeAtGainProCarouselNavigationPosition\":{\"type\":\"reactHoc\",\"name\":\"withLifeAtGainProCarouselNavigationPosition\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHiddenContent\":{\"type\":\"reactHoc\",\"name\":\"withHiddenContent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFilterContent\":{\"type\":\"reactHoc\",\"name\":\"withFilterContent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withABVariantButton\":{\"type\":\"reactHoc\",\"name\":\"withABVariantButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFilterContainer\":{\"type\":\"reactHoc\",\"name\":\"withFilterContainer\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./UtilityOverrides.map"],"mappings":"8IACqM,SAAgB,EAAoB,EAAU,CAAC,IAAM,EAAY,yCAAyC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAW,GAAeA,EAAS,YAAY,EAAQ,EAAaC,EAAO,IAAI,EAAE,SAAS,EAAY,EAAI,CAAC,OAAO,EAAI,MAAM,MAAM,CAAC,CAAC,EAAG,CAAC,IAAM,EAAkB,CAAC,4BAA4B,uBAAuB,yBAAyB,wBAAwB,yBAAyB,gCAAgC,yBAAyB,kCAAkC,uBAAuB,8BAA8B,8BAA8B,oCAAoC,EAAQ,MAAkB,CAAC,GAAG,MAAM,QAAQ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