{"version":3,"file":"SmoothScroll.BO7Z1K-K.mjs","names":[],"sources":["https:/framerusercontent.com/modules/28rXvpPsrum7FH6cMELS/1jCAazZw1EGHjrG5Nu5D/Utils.js","https:/framer.com/m/framer/utils.js@^0.9.0","https:/framerusercontent.com/modules/SVGZ9enfX0thv8zhILGQ/rty6WHLY7lavjs21IHpB/SmoothScroll.js"],"sourcesContent":["export const centerContent = {\n    display: \"flex\",\n    justifyContent: \"center\",\n    alignItems: \"center\"\n};\nexport const autoSizingText = {\n    width: \"max-content\",\n    wordBreak: \"break-word\",\n    overflowWrap: \"break-word\",\n    overflow: \"hidden\",\n    whiteSpace: \"pre-wrap\",\n    flexShrink: 0\n};\nexport const defaultContainerStyles = {\n    ...centerContent,\n    overflow: \"hidden\"\n};\nexport const containerStyles = defaultContainerStyles;\nexport const randomColor = ()=>\"#\" + Math.floor(Math.random() * 16777215).toString(16)\n;\n\nexport const __FramerMetadata__ = {\"exports\":{\"centerContent\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"containerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"autoSizingText\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"defaultContainerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"randomColor\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./Utils.map","/*\n * Utils (framer/utils@0.9.0)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/28rXvpPsrum7FH6cMELS/1jCAazZw1EGHjrG5Nu5D/Utils.js\"\n","import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";import{randomColor}from\"https://framer.com/m/framer/utils.js@^0.9.0\";import{animate}from\"framer-motion\";// Learn more: https://www.framer.com/developers/overrides/\nconst useStore=createStore({background:\"#0099FF\"});export function withRotate(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{rotate:90},transition:{duration:2}});});}export function withHover(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,whileHover:{scale:1.05}});});}export function withRandomColor(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{background:store.background},onClick:()=>{setStore({background:randomColor()});}});});}export function withSmoothScroll(Component){return props=>{const handleClick=e=>{e.preventDefault();const targetId=\"outside-of-design\";const target=document.getElementById(targetId);if(!target)return;const targetPosition=target.offsetTop;const startPosition=window.pageYOffset;const distance=targetPosition-startPosition;// Leaning toward cubic: slow → FAST → slow\nconst customEase=t=>{// Using 3.2 power (closer to cubic 3 than quartic 4)\nif(t<.5){// First half: controlled acceleration\nreturn Math.pow(2*t,3.2)/2;}else{// Second half: controlled deceleration\nreturn 1-Math.pow(-2*t+2,3.2)/2;}};animate(0,1,{duration:1,ease:customEase,onUpdate:progress=>{const currentPosition=startPosition+distance*progress;window.scrollTo(0,currentPosition);}});};return /*#__PURE__*/_jsx(Component,{...props,onClick:handleClick});};}export function withSmoothScrollToPrototype(Component){return props=>{const handleClick=e=>{e.preventDefault();const targetId=\"prototype\";const target=document.getElementById(targetId);if(!target)return;// Fix: Use getBoundingClientRect() + current scroll position\nconst targetPosition=target.getBoundingClientRect().top+window.pageYOffset;const startPosition=window.pageYOffset;const distance=targetPosition-startPosition;const customEase=t=>{if(t<.5){return Math.pow(2*t,3.2)/2;}else{return 1-Math.pow(-2*t+2,3.2)/2;}};animate(0,1,{duration:1,ease:customEase,onUpdate:progress=>{const currentPosition=startPosition+distance*progress;window.scrollTo(0,currentPosition);}});};return /*#__PURE__*/_jsx(Component,{...props,onClick:handleClick});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withSmoothScroll\":{\"type\":\"reactHoc\",\"name\":\"withSmoothScroll\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSmoothScrollToPrototype\":{\"type\":\"reactHoc\",\"name\":\"withSmoothScrollToPrototype\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SmoothScroll.map"],"mappings":"+OAAa,EAAgB,CACzB,QAAS,OACT,eAAgB,SAChB,WAAY,SACf,CAWG,CADA,GAAG,EACO,qBEdkpB,SAAgB,EAAiB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAY,GAAG,CAAC,EAAE,gBAAgB,CAAoC,IAAM,EAAO,SAAS,eAA1C,oBAAkE,CAAC,GAAG,CAAC,EAAO,OAAO,IAAM,EAAe,EAAO,UAAgB,EAAc,EAAO,YAAkB,EAAS,EAAe,EAIh7B,EAAQ,EAAE,EAAE,CAAC,SAAS,EAAE,KAH1C,GACd,EAAE,IACW,EAAE,IAAE,IAAK,EAClB,GAAW,GAAG,EAAE,IAAE,IAAK,EAA6C,SAAS,GAAU,CAAC,IAAM,EAAgB,EAAc,EAAS,EAAS,EAAO,SAAS,EAAE,EAAgB,EAAG,CAAC,EAAG,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,QAAQ,EAAY,CAAC,EAAI,SAAgB,EAA4B,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAY,GAAG,CAAC,EAAE,gBAAgB,CAA4B,IAAM,EAAO,SAAS,eAAlC,YAA0D,CAAC,GAAG,CAAC,EAAO,OACxc,IAAM,EAAe,EAAO,uBAAuB,CAAC,IAAI,EAAO,YAAkB,EAAc,EAAO,YAAkB,EAAS,EAAe,EAAgH,EAAQ,EAAE,EAAE,CAAC,SAAS,EAAE,KAAzG,GAAO,EAAE,IAAoB,EAAE,IAAE,IAAK,EAAe,GAAW,GAAG,EAAE,IAAE,IAAK,EAA6C,SAAS,GAAU,CAAC,IAAM,EAAgB,EAAc,EAAS,EAAS,EAAO,SAAS,EAAE,EAAgB,EAAG,CAAC,EAAG,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,QAAQ,EAAY,CAAC,uBANlb,IAA8B,IAAqE,IAAqE,IAAmC,CACvO,EAAY,CAAC,WAAW,UAAU,CAAC"}