{"version":3,"file":"scroll.DN_O_yte.mjs","names":["useState","__legacyOverrideHOC_DataObserverContext","_jsx","useState"],"sources":["https:/framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js","https:/framer.com/m/framer/store.js@^1.0.0","https:/framerusercontent.com/modules/5sD1L34Nn4AzaFRyCPrW/BT9HMtTDsUFnXFBXXei7/useIsomorphicLayoutEffect.js","https:/framer.com/m/framer/useIsomorphicLayoutEffect.js@^0.2.0","https:/framerusercontent.com/modules/GBoYA6hnuFwSZZCbht26/cguAGhuQfx1BXbfShe7V/useMeasuredSize.js","https:/framer.com/m/framer/useMeasuredSize.js","https:/framerusercontent.com/modules/zH1s2HUoNTEh0amwy6q3/beCnfdbTkJOfvy2cvg1m/scroll.js"],"sourcesContent":["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","/*\n * createStore (framer/store@1.0.1)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js\"\n","import{useLayoutEffect,useEffect}from\"react\";/**\n * Swaps `useLayoutEffect` for `useEffect` on the server to avoid React warnings.\n * NOTE! The effect won't run on the server.\n */ export const useIsomorphicLayoutEffect=typeof document!==\"undefined\"?useLayoutEffect:useEffect;\nexport const __FramerMetadata__ = {\"exports\":{\"useIsomorphicLayoutEffect\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./useIsomorphicLayoutEffect.map","/*\n * useIsomorphicLayoutEffect (framer/useIsomorphicLayoutEffect@0.2.0)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/5sD1L34Nn4AzaFRyCPrW/BT9HMtTDsUFnXFBXXei7/useIsomorphicLayoutEffect.js\"\n","import*as React from\"react\";import{useIsomorphicLayoutEffect}from\"https://framer.com/m/framer/useIsomorphicLayoutEffect.js@^0.2.0\";let safeResizeObserver=undefined;try{if(typeof window!==undefined){safeResizeObserver=window.ResizeObserver;}}catch(e){// happy linting!\n}class SharedObserver{//@ts-ignore\nupdateResizedElements(entries){for(const entry of entries){const callbackForElement=this.callbacks.get(entry.target);if(callbackForElement)callbackForElement(entry.contentRect);}}observeElementWithCallback(element,callback){if(!this.sharedResizeObserver)return;this.sharedResizeObserver.observe(element);this.callbacks.set(element,callback);}unobserve(element){if(!this.sharedResizeObserver)return;this.sharedResizeObserver.unobserve(element);this.callbacks.delete(element);}constructor(){this.callbacks=new WeakMap();const ResizeObserver1=safeResizeObserver;if(!ResizeObserver1)return;this.sharedResizeObserver=new ResizeObserver1(this.updateResizedElements.bind(this));}}const sharedResizeObserver=new SharedObserver();/**\n * Uses a globally shared resize observer, and returns an updated\n * size object when the element's size changes. This is the recommended way to\n * use a Resize Observer: https://github.com/WICG/resize-observer/issues/59.\n */ export function useMeasuredSize(ref,callback){const[size,setSize]=React.useState(null);function updateSize(newSize){if(!size||newSize.height!==size.height||newSize.width!==size.width){if(callback)callback(newSize);setSize({width:newSize.width,height:newSize.height});}}// On mount, immediately measure and set a size. This will defer paint until\n// no more updates are scheduled. Additionally add our element to the shared\n// ResizeObserver with a callback to perform when the element resizes.\n// Finally, remove the element from the observer when the component is unmounted.\nuseIsomorphicLayoutEffect(()=>{if(!ref.current)return;const{offsetWidth,offsetHeight}=ref.current;// Defer paint until initial size is added.\nupdateSize({width:offsetWidth,height:offsetHeight});// Resize observer will race to add the initial size, but since the size\n// is set above, it won't trigger a render on mount since it should\n// match the measured size. Future executions of the callback will\n// trigger renders if the size changes.\nsharedResizeObserver.observeElementWithCallback(ref.current,updateSize);return()=>{if(!ref.current)return;sharedResizeObserver.unobserve(ref.current);};},[]);return size;}export function useSizeChange(ref,callback){const size=React.useRef(null);const updateSize=React.useCallback(newSize=>{if(!size.current||newSize.height!==size.current.height||newSize.width!==size.current.width){size.current={width:newSize.width,height:newSize.height};if(callback)callback(size.current);}},[callback]);// On mount, immediately measure and set a size. This will defer paint until\n// no more updates are scheduled. Additionally add our element to the shared\n// ResizeObserver with a callback to perform when the element resizes.\n// Finally, remove the element from the observer when the component is unmounted.\nuseIsomorphicLayoutEffect(()=>{if(!ref.current)return;const{offsetWidth,offsetHeight}=ref.current;// Defer paint until initial size is added.\nupdateSize({width:offsetWidth,height:offsetHeight});// Resize observer will race to add the initial size, but since the size\n// is set above, it won't trigger a render on mount since it should\n// match the measured size. Future executions of the callback will\n// trigger renders if the size changes.\nsharedResizeObserver.observeElementWithCallback(ref.current,updateSize);return()=>{if(!ref.current)return;sharedResizeObserver.unobserve(ref.current);};},[callback]);return null;}\nexport const __FramerMetadata__ = {\"exports\":{\"useSizeChange\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useMeasuredSize\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./useMeasuredSize.map","/*\n * useMeasuredSize (framer/useMeasuredSize@0.13.0)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/GBoYA6hnuFwSZZCbht26/cguAGhuQfx1BXbfShe7V/useMeasuredSize.js\"\n","import{jsx as _jsx}from\"react/jsx-runtime\";import{createContext,useContext,useLayoutEffect,useRef}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";import{useMeasuredSize}from\"https://framer.com/m/framer/useMeasuredSize.js\";import{useMotionValue,useMotionValueEvent,useScroll}from\"framer\";// Learn more: https://www.framer.com/developers/overrides/\nconst useStore=createStore({ref:null});const containerContext=/*#__PURE__*/createContext(null);const useContainerContext=()=>{const ref=useContext(containerContext);if(!ref)throw new Error(\"Cannot use container context outside of scroll container\");return ref;};export function relativeScrollContainer(Component){return props=>{const motionValue=useMotionValue(0);return /*#__PURE__*/_jsx(containerContext.Provider,{value:motionValue,children:/*#__PURE__*/_jsx(Component,{...props})});};}export function withRelativeScroll(Component){return props=>{const ref=useRef();const motionValue=useContainerContext();const renderedSize=useMeasuredSize(ref);const bodySize=useRef(null);const x=useMotionValue(0);function updatePosition(progress){const bodyWidth=bodySize.current?.width??0;const renderedSizeWidth=renderedSize?.width??0;x.set(progress*(renderedSizeWidth-bodyWidth)*-1);}useLayoutEffect(()=>{function setBodySize(){const bbox=document.body.getBoundingClientRect();bodySize.current={width:bbox.width,height:bbox.height};}function handler(){setBodySize();updatePosition(motionValue.get());}handler();window.addEventListener(\"resize\",handler);return()=>window.removeEventListener(\"resize\",setBodySize);},[]);useMotionValueEvent(motionValue,\"change\",updatePosition);return /*#__PURE__*/_jsx(Component,{ref:ref,style:{x},...props});};}export function relativeScrollTarget(Component){return props=>{const motionValue=useContainerContext();const ref=useRef(null);const scroll=useScroll({axis:\"y\",target:ref,offset:[\"start end\",\"end end\"]});useMotionValueEvent(scroll.scrollYProgress,\"change\",latestValue=>{motionValue.set(latestValue);});return /*#__PURE__*/_jsx(Component,{ref:ref,...props});};}import{useEffect,useState}from\"react\";export const MinWidth35vw=()=>({style:{minWidth:\"35vw\"}});export const MinWidt100vw=()=>({style:{minWidth:\"100vw\"}});export const MinWidt130vw=()=>({style:{minWidth:\"130vw\"}});export const MinWidt25vw=()=>({style:{minWidth:\"25vw\"}});export const Height50vhMinusHalfPpegeo=()=>{const[height,setHeight]=useState(null);useEffect(()=>{const updateHeight=()=>{const refEl=document.querySelector(\".framer-ppegeo\");const refHeight=refEl?.offsetHeight??0;const calculated=window.innerHeight*.5-refHeight*.5;setHeight(Math.max(calculated,0));};updateHeight();window.addEventListener(\"resize\",updateHeight);return()=>window.removeEventListener(\"resize\",updateHeight);},[]);return{style:height!==null?{height:`${height}px`}:{}};};import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withMinWidth35vw(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...MinWidth35vw(props)});};}withMinWidth35vw.displayName=\"MinWidth35vw\";export function withMinWidt100vw(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...MinWidt100vw(props)});};}withMinWidt100vw.displayName=\"MinWidt100vw\";export function withMinWidt130vw(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...MinWidt130vw(props)});};}withMinWidt130vw.displayName=\"MinWidt130vw\";export function withMinWidt25vw(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...MinWidt25vw(props)});};}withMinWidt25vw.displayName=\"MinWidt25vw\";export function withHeight50vhMinusHalfPpegeo(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...Height50vhMinusHalfPpegeo(props)});};}withHeight50vhMinusHalfPpegeo.displayName=\"Height50vhMinusHalfPpegeo\";\nexport const __FramerMetadata__ = {\"exports\":{\"Height50vhMinusHalfPpegeo\":{\"type\":\"override\",\"name\":\"Height50vhMinusHalfPpegeo\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"relativeScrollTarget\":{\"type\":\"reactHoc\",\"name\":\"relativeScrollTarget\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMinWidth35vw\":{\"type\":\"reactHoc\",\"name\":\"withMinWidth35vw\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRelativeScroll\":{\"type\":\"reactHoc\",\"name\":\"withRelativeScroll\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"relativeScrollContainer\":{\"type\":\"reactHoc\",\"name\":\"relativeScrollContainer\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMinWidt25vw\":{\"type\":\"reactHoc\",\"name\":\"withMinWidt25vw\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHeight50vhMinusHalfPpegeo\":{\"type\":\"reactHoc\",\"name\":\"withHeight50vhMinusHalfPpegeo\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"MinWidt25vw\":{\"type\":\"override\",\"name\":\"MinWidt25vw\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"MinWidth35vw\":{\"type\":\"override\",\"name\":\"MinWidth35vw\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"MinWidt100vw\":{\"type\":\"override\",\"name\":\"MinWidt100vw\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMinWidt130vw\":{\"type\":\"reactHoc\",\"name\":\"withMinWidt130vw\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMinWidt100vw\":{\"type\":\"reactHoc\",\"name\":\"withMinWidt100vw\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"MinWidt130vw\":{\"type\":\"override\",\"name\":\"MinWidt130vw\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./scroll.map"],"mappings":"+PAA8E,SAAgB,EAAY,EAAO,CACjH,IAAM,EAAU,EAAK,CAAC,MAAM,OAAO,OAAO,CAAC,GAAG,CAAM,CAAC,CAAC,CAAC,EACjD,EAAa,GAAU,CAC1B,OAAO,GAAW,aAAY,EAAS,EAAS,EAAU,KAAK,GAAG,EAAU,MAAM,OAAO,OAAO,CAAC,GAAG,EAAU,MAAM,GAAG,CAAQ,CAAC,CAAE,EACjI,EAAW,OAAO,GAAS,SAAS,OAAO,OAAO,CAAC,GAAG,CAAM,CAAC,EAAE,EAC7D,EAAa,IAAI,IACjB,EAAc,GAAU,CAC3B,OAAO,GAAW,aAAY,EAAS,EAAS,CAAU,GAAG,EAAW,OAAO,GAAW,SAAS,OAAO,OAAO,CAAC,GAAG,EAAW,GAAG,CAAQ,CAAC,EAAE,EACjJ,EAAa,QAAQ,GAAQ,EAAO,CAAU,CAAC,CAAE,EACjD,SAAS,GAAU,CACnB,GAAK,CAAC,EAAM,GAAUA,EAAS,CAAU,EAKzC,OAHA,OACA,EAAa,IAAI,CAAQ,MAAY,EAAa,OAAO,CAAQ,GAAI,CAAC,CAAC,EACpE,EAAe,IAAI,IAAM,EAAe,EAAQ,CAAC,EAAU,MAAM,CAAY,GAC1E,CAAC,EAAM,CAAa,CAAG,CAAC,OAAO,CAAS,iBAfT,IAAwC,kCEAjC,0CEAjB,IAAuG,EAAK,EAAmB,IAAA,GAAU,GAAG,CAA+B,EAAmB,EAAO,cAAgB,MAAS,CACzP,CAAO,EAAN,KAAoB,CACrB,sBAAsB,EAAQ,CAAC,IAAI,IAAM,KAAS,EAAQ,CAAC,I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