{"version":3,"file":"utils.DgOENuFn.mjs","names":["useRef","useMemo"],"sources":["https:/framerusercontent.com/modules/Yppqt3Cs3Y8TZqvASnXl/PGrowqBrgWCViHduGfsA/SmoothScroll_Prod.js","https:/framerusercontent.com/modules/DyldKav0OOAWR3bCAlhK/8c3l9FzyOlGpbPncYhfc/nullstate.js","https:/framer.com/m/framer/icon-nullstate.js@0.7.0","https:/framerusercontent.com/modules/Ma20hU0GGRxLxZphbywl/OSpwWF91FHPVFyQJjMHt/utils.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,withCSS}from\"framer\";import Lenis from\"lenis\";import{useEffect,useRef}from\"react\";function SmoothScrollComponent(props){const{intensity}=props;const lenis=useRef(null);useEffect(()=>{if(lenis.current){try{lenis.current.scrollTo(0,{immediate:true});}catch(error){console.error(\"Error scrolling to top:\",error);}}},[lenis]);// Watch for stop scroll elements\nuseEffect(()=>{const checkForStopScroll=()=>{try{const stopScrollElement=document.querySelector(\"[data-frameruni-stop-scroll]\");const htmlElement=document.documentElement;const hasHiddenOverflow=htmlElement&&htmlElement.style&&htmlElement.style.overflow===\"hidden\";if(lenis.current){if(stopScrollElement||hasHiddenOverflow){lenis.current.stop();}else{lenis.current.start();}}}catch(error){console.error(\"Error in checkForStopScroll:\",error);}};// Initial check\ncheckForStopScroll();// Set up observers\nlet stopScrollObserver;let htmlStyleObserver;try{stopScrollObserver=new MutationObserver(checkForStopScroll);htmlStyleObserver=new MutationObserver(checkForStopScroll);// Observe document for data-frameruni-stop-scroll attribute\nif(document&&document.documentElement){stopScrollObserver.observe(document.documentElement,{childList:true,subtree:true,attributes:true,attributeFilter:[\"data-frameruni-stop-scroll\"]});// Observe only the HTML element for style changes\nhtmlStyleObserver.observe(document.documentElement,{attributes:true,attributeFilter:[\"style\"]});}}catch(error){console.error(\"Error setting up observers:\",error);}return()=>{try{if(stopScrollObserver)stopScrollObserver.disconnect();if(htmlStyleObserver)htmlStyleObserver.disconnect();}catch(error){console.error(\"Error disconnecting observers:\",error);}};},[]);useEffect(()=>{try{if(!document)return;const allElements=document.getElementsByTagName(\"*\");for(let i=0;i<allElements.length;i++){const element=allElements[i];if(!element)continue;try{const computedStyle=window.getComputedStyle(element);if(computedStyle&&computedStyle.getPropertyValue(\"overflow\")===\"auto\"){element.setAttribute(\"data-lenis-prevent\",\"true\");}}catch(styleError){console.error(\"Error getting computed style:\",styleError);}}}catch(error){console.error(\"Error in overflow detection:\",error);}},[]);useEffect(()=>{try{if(typeof Lenis!==\"function\"){console.error(\"Lenis is not available\");return;}lenis.current=new Lenis({duration:(intensity||10)/10});const raf=time=>{if(lenis.current){try{lenis.current.raf(time);requestAnimationFrame(raf);}catch(error){console.error(\"Error in animation frame:\",error);}}};const animationId=requestAnimationFrame(raf);return()=>{cancelAnimationFrame(animationId);if(lenis.current){try{lenis.current.destroy();lenis.current=null;}catch(error){console.error(\"Error destroying Lenis:\",error);}}};}catch(error){console.error(\"Error initializing Lenis:\",error);return()=>{};}},[intensity]);//https://github.com/darkroomengineering/lenis?tab=readme-ov-file#anchor-links\nuseEffect(()=>{try{if(!document||!lenis.current)return;// Get all anchor links and store click handlers with their targets\nconst anchorLinksData=Array.from(document.querySelectorAll(\"a[href]\")||[]).filter(element=>{if(!element)return false;const anchor=element;if(!anchor.href)return false;// Only handle internal anchor links\nconst isInternalLink=anchor.href.startsWith(window.location.origin)||anchor.href.startsWith(\"./\")||anchor.href.startsWith(\"/\");const hasHash=anchor.href.includes(\"#\");return isInternalLink&&hasHash;}).map(anchor=>{try{const anchorElement=anchor;const href=anchorElement.href.includes(\"#\")?`#${anchorElement.href.split(\"#\").pop()}`:\"\";const decodedHref=href?decodeURIComponent(href):\"\";let scrollMargin=0;try{if(decodedHref){const targetElement=document.querySelector(decodedHref);if(targetElement){const marginStyle=window.getComputedStyle(targetElement).scrollMarginTop;scrollMargin=marginStyle?parseInt(marginStyle)||0:0;}}}catch(targetError){console.error(\"Error finding target element:\",targetError);}return{href,scrollMargin,anchorElement:anchorElement};}catch(anchorError){console.error(\"Error processing anchor:\",anchorError);return null;}}).filter(Boolean);const handleClick=(e,href,scrollMargin)=>{try{if(e&&e.preventDefault)e.preventDefault();if(lenis.current&&href){lenis.current.scrollTo(href,{offset:-(scrollMargin||0)});}}catch(error){console.error(\"Error in anchor click handler:\",error);}};const handlers=anchorLinksData.map(({href,scrollMargin})=>e=>handleClick(e,href,scrollMargin));anchorLinksData.forEach(({anchorElement},index)=>{if(anchorElement&&handlers[index]){anchorElement.addEventListener(\"click\",handlers[index]);}});return()=>{anchorLinksData.forEach(({anchorElement},index)=>{if(anchorElement&&handlers[index]){anchorElement.removeEventListener(\"click\",handlers[index]);}});};}catch(error){console.error(\"Error setting up anchor links:\",error);return()=>{};}},[lenis]);return /*#__PURE__*/_jsx(\"div\",{style:props.style});}/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n *\n * @framerDisableUnlink\n */const SmoothScroll=withCSS(SmoothScrollComponent,[\"html.lenis { height: auto; }\",\".lenis.lenis-smooth { scroll-behavior: auto !important; }\",\".lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }\",\".lenis.lenis-stopped { overflow: hidden; }\",\".lenis.lenis-scrolling iframe { pointer-events: none; }\"],\"\");export default SmoothScroll;SmoothScroll.displayName=\"Smooth Scroll\";addPropertyControls(SmoothScroll,{intensity:{title:\"Intensity\",type:ControlType.Number,defaultValue:10,min:0,description:\"More components at [Framer University](https://frameruni.link/cc).\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SmoothScroll\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerDisableUnlink\":\"\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SmoothScroll_Prod.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport * as React from \"react\";\nexport const containerStyles = {\n    width: \"100%\",\n    height: \"100%\",\n    display: \"flex\",\n    justifyContent: \"center\",\n    alignItems: \"center\"\n};\nconst nullIconStyle = {\n    minWidth: \"10px\",\n    minHeight: \"10px\",\n    maxWidth: \"20px\",\n    maxHeight: \"20px\",\n    width: \"60%\",\n    height: \"60%\"\n};\nconst emptyStateStyle = {\n    ...containerStyles,\n    borderRadius: 6,\n    background: \"rgba(149, 149, 149, 0.1)\",\n    border: \"1px dashed rgba(149, 149, 149, 0.15)\",\n    color: \"#a5a5a5\",\n    flexDirection: \"column\"\n};\nexport const NullState = /*#__PURE__*/ React.forwardRef((_, ref)=>{\n    return(/*#__PURE__*/ _jsx(\"div\", {\n        style: emptyStateStyle,\n        ref: ref\n    }));\n}) /*\n\n<svg\n                xmlns=\"http://www.w3.org/2000/svg\"\n                viewBox=\"0 0 30 30\"\n                style={nullIconStyle}\n            >\n                <path\n                    d=\"M 12.857 0 C 19.958 0 25.714 5.756 25.714 12.857 C 25.714 19.958 19.958 25.714 12.857 25.714 C 5.756 25.714 0 19.958 0 12.857 C 0 5.756 5.756 0 12.857 0 Z\"\n                    fill=\"#FFFFFF\"\n                ></path>\n                <path\n                    d=\"M 20.357 20.357 L 27.857 27.857\"\n                    fill=\"transparent\"\n                    strokeWidth=\"4.28\"\n                    stroke=\"#FFFFFF\"\n                    strokeLinecap=\"round\"\n                ></path>\n                <g transform=\"translate(9.643 6.429)\">\n                    <path\n                        d=\"M 3.214 12.857 L 3.214 12.857\"\n                        fill=\"transparent\"\n                        strokeWidth=\"3.75\"\n                        stroke=\"currentColor\"\n                        strokeLinecap=\"round\"\n                    ></path>\n                    <path\n                        d=\"M 0 3.214 C 0 1.004 1.843 0 3.214 0 C 4.586 0 6.429 0.603 6.429 3.214 C 6.429 5.826 3.214 5.913 3.214 7.232 C 3.214 8.552 3.214 8.571 3.214 8.571\"\n                        fill=\"transparent\"\n                        strokeWidth=\"3.22\"\n                        stroke=\"currentColor\"\n                        strokeLinecap=\"round\"\n                        strokeLinejoin=\"round\"\n                    ></path>\n                </g>\n            </svg>\n            */ ;\n\nexport const __FramerMetadata__ = {\"exports\":{\"containerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"NullState\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./nullstate.map","/*\n * nullstate (framer/icon-nullstate@0.7.0)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/DyldKav0OOAWR3bCAlhK/8c3l9FzyOlGpbPncYhfc/nullstate.js\"\n","import{useMemo}from\"react\";import{ControlType}from\"framer\";/*\n ** ICON UTILS\n ** Pull as much re-usable logic into here as possible\n ** This will make it easier to replace in all icon components\n */ export const containerStyles={width:\"100%\",height:\"100%\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\"};export const defaultEvents={onClick:{type:ControlType.EventHandler},onMouseDown:{type:ControlType.EventHandler},onMouseUp:{type:ControlType.EventHandler},onMouseEnter:{type:ControlType.EventHandler},onMouseLeave:{type:ControlType.EventHandler}};const findByArray=(arr,search)=>arr.find(a=>a.toLowerCase().includes(search));export function getIconSelection(iconKeys,selectByList,iconSearch=\"\",iconSelection,lowercaseIconKeyPairs){// gotta get the exact match first THEN find\n// have a set and try to access ?\nif(selectByList)return iconSelection;if(iconSearch==null||(iconSearch===null||iconSearch===void 0?void 0:iconSearch.length)===0)return null;const iconSearchTerm=iconSearch.toLowerCase().replace(/-|\\s/g,\"\");var _iconSearchTerm;// check for exact match, otherwise use .find\nconst searchResult=(_iconSearchTerm=lowercaseIconKeyPairs[iconSearchTerm])!==null&&_iconSearchTerm!==void 0?_iconSearchTerm:findByArray(iconKeys,iconSearchTerm);return searchResult;}export function useIconSelection(iconKeys,selectByList,iconSearch=\"\",iconSelection,lowercaseIconKeyPairs){// Clean search term\nconst iconSearchResult=useMemo(()=>{if(iconSearch==null||(iconSearch===null||iconSearch===void 0?void 0:iconSearch.length)===0)return null;const iconSearchTerm=iconSearch.toLowerCase().replace(/-|\\s/g,\"\");var _iconSearchTerm;// check for exact match, otherwise use .find\nconst searchResult=(_iconSearchTerm=lowercaseIconKeyPairs[iconSearchTerm])!==null&&_iconSearchTerm!==void 0?_iconSearchTerm:findByArray(iconKeys,iconSearchTerm);return searchResult;},[iconSelection,iconSearch]);const name=selectByList?iconSelection:iconSearchResult;return name;}\nexport const __FramerMetadata__ = {\"exports\":{\"getIconSelection\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"containerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useIconSelection\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"defaultEvents\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./utils.map"],"mappings":"qQAAoK,SAAS,EAAsB,EAAM,CAAC,GAAK,CAAC,aAAW,EAAY,EAAMA,EAAO,KAAK,CAQu0C,OARt0C,MAAc,CAAC,GAAG,EAAM,QAAS,GAAG,CAAC,EAAM,QAAQ,SAAS,EAAE,CAAC,UAAU,GAAK,CAAC,OAAQ,EAAM,CAAC,QAAQ,MAAM,0BAA0B,EAAM,GAAK,CAAC,EAAM,CAAC,CACnZ,MAAc,CAAC,IAAM,MAAuB,CAAC,GAAG,CAAC,IAAM,EAAkB,SAAS,cAAc,+BAA+B,CAAO,EAAY,SAAS,gBAAsB,EAAkB,GAAa,EAAY,OAAO,EAAY,MAAM,WAAW,SAAY,EAAM,UAAY,GAAmB,EAAmB,EAAM,QAAQ,MAAM,CAAO,EAAM,QAAQ,OAAO,QAAU,EAAM,CAAC,QAAQ,MAAM,+BAA+B,EAAM,GACxb,GAAoB,CACpB,IAAI,EAAuB,EAAkB,GAAG,CAAC,EAAmB,IAAI,iBAAiB,EAAmB,CAAC,EAAkB,IAAI,iBAAiB,EAAmB,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