{"version":3,"file":"Examples.D111F7UE.mjs","names":["useState","useId","useMemo","useRef","useCallback","__esmMin","ie","init_ssg_sandbox_shims","ne","_e","de","pe","p","J","init_jsx_runtime","init_npm_react_18_3_1","ce","window","useScroll","useSpring","init_framer_motion_DhsWWWsN","useObserveData","useIsStaticRenderer","init_framer_CaDWdxiz","Data","createStore","dataStore","state1","setDataStore","newState","storeState","storeSetters","setStoreState","setter","useStore","state","setState","init_createStore","init_store_js__1_0","centerContent","init_Utils","init_utils_js__0_9","withReadingProgress","smoothProgress","scrollYProgress","isStatic","hasWindow","Component","props","withDropCap","localId","scopeClassName","wrapperRef","wrapper","firstParagraph","withFacebookPixelLead","formRef","setRefs","node","ref","win","fbqStub","args","callable","script","firstScript","DEFAULT_FACEBOOK_PIXEL_ID","handleSubmit","init_Examples"],"sources":["https:/framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js","https:/framer.com/m/framer/store.js@^1.0.0","https:/framerusercontent.com/modules/28rXvpPsrum7FH6cMELS/1jCAazZw1EGHjrG5Nu5D/Utils.js","https:/framer.com/m/framer/utils.js@^0.9.0","https:/framerusercontent.com/modules/fmDHCtCvWlyms5VKWnd7/OtGs6r0CGyc0WZUbtfe7/Examples.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","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,jsxs as _jsxs}from\"react/jsx-runtime\";import{forwardRef,useCallback,useEffect,useId,useMemo,useRef}from\"react\";// @ts-expect-error Framer URL import is resolved at runtime in Framer\nimport{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";// @ts-expect-error Framer URL import is resolved at runtime in Framer\nimport{randomColor}from\"https://framer.com/m/framer/utils.js@^0.9.0\";import{useIsStaticRenderer}from\"framer\";import{useScroll,useSpring}from\"framer-motion\";// Learn more: https://www.framer.com/docs/guides/overrides/\nconst useStore=createStore({background:\"#0099FF\"});const DEFAULT_FACEBOOK_PIXEL_ID=\"1769650110979787\";export function withRotate(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,animate:{rotate:90},transition:{duration:2}});};}export function withHover(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,whileHover:{scale:1.05}});};}export function withRandomColor(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{...props,animate:{background:store.background},onClick:()=>{setStore({background:randomColor()});}});};}export function withReadingProgress(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const{scrollYProgress}=useScroll();const smoothProgress=useSpring(scrollYProgress,{stiffness:120,damping:30,mass:.2});const isStatic=useIsStaticRenderer();const hasWindow=typeof window!==\"undefined\";return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style,scaleX:!hasWindow||isStatic?0:smoothProgress,transformOrigin:\"left center\"}});});}export function withDropCap(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const localId=useId();const scopeClassName=useMemo(()=>`dropcap-scope-${localId.replace(/[:]/g,\"\")}`,[localId]);const wrapperRef=useRef(null);useEffect(()=>{if(typeof window===\"undefined\")return;const wrapper=wrapperRef.current;if(!wrapper)return;const firstParagraph=wrapper.querySelector(\"p\");if(!firstParagraph)return;firstParagraph.setAttribute(\"data-dropcap-first\",\"true\");return()=>{firstParagraph.removeAttribute(\"data-dropcap-first\");};},[]);return /*#__PURE__*/_jsxs(\"div\",{ref:wrapperRef,className:scopeClassName,style:{position:\"relative\"},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                    .${scopeClassName} [data-dropcap-first=\"true\"]::first-letter {\n                        float: left;\n                        font-size: 3.4em;\n                        line-height: 0.8;\n                        font-weight: 700;\n                        padding-right: 8px;\n                        padding-top: 4px;\n                        color: currentColor;\n                    }\n                `}),/*#__PURE__*/_jsx(Component,{ref:ref,...props})]});});}export function withFacebookPixelLead(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const formRef=useRef(null);const setRefs=useCallback(node=>{formRef.current=node;if(typeof ref===\"function\"){ref(node);}else if(ref&&typeof ref===\"object\"){ref.current=node;}},[ref]);useEffect(()=>{if(typeof window===\"undefined\"||typeof document===\"undefined\")return;const win=window;if(!win.fbq){const fbqStub=function(...args){const callable=fbqStub;if(callable.callMethod){callable.callMethod.apply(callable,args);}else{callable.queue.push(args);}};fbqStub.queue=[];fbqStub.loaded=true;fbqStub.version=\"2.0\";win.fbq=fbqStub;win._fbq=fbqStub;if(!document.getElementById(\"framer-meta-pixel-base\")){const script=document.createElement(\"script\");script.id=\"framer-meta-pixel-base\";script.async=true;script.src=\"https://connect.facebook.net/en_US/fbevents.js\";const firstScript=document.getElementsByTagName(\"script\")[0];if(firstScript?.parentNode){firstScript.parentNode.insertBefore(script,firstScript);}else{document.head.appendChild(script);}}win.fbq(\"init\",DEFAULT_FACEBOOK_PIXEL_ID);win.fbq(\"track\",\"PageView\");}},[]);useEffect(()=>{if(typeof window===\"undefined\")return;const node=formRef.current;if(!node)return;const handleSubmit=()=>{const win=window;if(typeof win.fbq===\"function\"){win.fbq(\"track\",\"Lead\");}};node.addEventListener(\"submit\",handleSubmit);return()=>{node.removeEventListener(\"submit\",handleSubmit);};},[]);return /*#__PURE__*/_jsx(Component,{ref:setRefs,...props});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withDropCap\":{\"type\":\"reactHoc\",\"name\":\"withDropCap\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withReadingProgress\":{\"type\":\"reactHoc\",\"name\":\"withReadingProgress\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFacebookPixelLead\":{\"type\":\"reactHoc\",\"name\":\"withFacebookPixelLead\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Examples.map"],"mappings":"A,0SAA8E,SAAgByB,EAAY,EAAO,CACjH,IAAMC,EAAUF,EAAK,CAAC,MAAM,OAAO,OAAO,CAAC,GAAGG,CAAM,CAAC,CAAC,CAAC,EACjDC,EAAa,GAAU,CAC1B,OAAOC,GAAW,aAAY,EAASA,EAASH,EAAU,KAAK,GAAG,EAAU,MAAM,OAAO,OAAO,CAAC,GAAGA,EAAU,MAAM,GAAGG,CAAQ,CAAC,CAAE,EACjIC,EAAW,OAAOH,GAAS,SAAS,OAAO,OAAO,CAAC,GAAGA,CAAM,CAAC,EAAEA,EAC7DI,kBAAa,IAAI,IACjBC,EAAc,GAAU,CAC3B,OAAOH,GAAW,aAAY,EAASA,EAASC,CAAU,GAAG,EAAW,OAAOD,GAAW,SAAS,OAAO,OAAO,CAAC,GAAGC,EAAW,GAAGD,CAAQ,CAAC,EAAEA,EACjJE,EAAa,QAAQ,GAA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