{"version":3,"file":"UtilityOverrides.BR_8TYIf.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/0n8lAoZmGIKTGOSrztxX/pBmi2UWeDH4NftBwLaV5/UtilityOverrides.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useLayoutEffect,useRef}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 withLifeAtGainProCarouselNavigationPosition(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:\"-405px\",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\":{\"withFilterContent\":{\"type\":\"reactHoc\",\"name\":\"withFilterContent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHiddenContent\":{\"type\":\"reactHoc\",\"name\":\"withHiddenContent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCarouselBottomLeftPosition\":{\"type\":\"reactHoc\",\"name\":\"withCarouselBottomLeftPosition\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLogProps\":{\"type\":\"reactHoc\",\"name\":\"withLogProps\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFilterContainer\":{\"type\":\"reactHoc\",\"name\":\"withFilterContainer\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLifeAtGainProCarouselNavigationPosition\":{\"type\":\"reactHoc\",\"name\":\"withLifeAtGainProCarouselNavigationPosition\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./UtilityOverrides.map"],"mappings":"yHACA,SAAgB,EAAa,EAAU,CAAC,MAAO,KAAQ,QAAQ,IAAI,EAAM,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAM,UAAU,iBAAiB,QAAQ,QAAQ,IAAI,cAAc,EAAM,KAAK,CAAC,CAAC,EAAI,SAAgB,EAA4C,EAAU,CAAC,MAAO,IAAO,CAC1R,IAAM,EAAaA,EAAO,KAAK,CAUyE,OAVxE,MAAoB,CAAC,IAAM,EAAU,EAAa,QAAQ,GAAG,CAAC,EAAU,OAExG,EAAU,MAAM,SAAS,WACzB,EAAU,MAAM,OAAO,OAAO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