{"version":3,"file":"Examples.C0iW8y3f.mjs","names":["useState","useMemo","useState","useCallback"],"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/y1vMI7U7GD3UNFPOwvIn/LTYXhKmvZEv24BLYLrUk/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}from\"react/jsx-runtime\";import{forwardRef,startTransition,useCallback,useEffect,useMemo,useState}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\";// 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 withHubSpotRequiredMarkerContrast(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const styleElementId=useMemo(()=>\"hs-required-contrast-style\",[]);useEffect(()=>{if(typeof document===\"undefined\"||typeof window===\"undefined\")return;const cssRule=`\n/* Intended for the HubSpot form used on the current page override instance.\n   Some HubSpot wrappers do not forward className to rendered form markup,\n   so we use the narrowest reliable HubSpot selector chain. */\n.hbspt-form .hs-form-required,\nform.hs-form .hs-form-required,\n.hs-form .hs-form-required,\n.hs-form-required {\n    color: #FFFFFF !important;\n    opacity: 1 !important;\n    text-shadow: 0 0 1px rgba(0, 0, 0, 0.75) !important;\n}\n`;let styleElement=document.getElementById(styleElementId);if(!styleElement){styleElement=document.createElement(\"style\");styleElement.id=styleElementId;styleElement.setAttribute(\"data-owner\",\"withHubSpotRequiredMarkerContrast\");styleElement.setAttribute(\"data-ref-count\",\"0\");document.head.appendChild(styleElement);}if(styleElement.textContent!==cssRule){styleElement.textContent=cssRule;}const currentCount=Number(styleElement.getAttribute(\"data-ref-count\")||\"0\");styleElement.setAttribute(\"data-ref-count\",String(currentCount+1));const trackedFormGuid=\"7f5e474c-fac0-4007-9253-9db662b9bc0b\";const redirectUrl=\"https://formazione.radicalhr.it/grazie-learningweek/\";const windowWithHubSpotState=window;const resolveGuid=value=>{return typeof value===\"string\"?value.toLowerCase():null;};if(!windowWithHubSpotState.__hubSpotFormSubmitListenerState__){const handler=event=>{const payload=event.data;if(!payload||typeof payload!==\"object\")return;const eventData=payload;if(eventData.type!==\"hsFormCallback\"||eventData.eventName!==\"onFormSubmitted\"){return;}const nestedData=eventData.data&&typeof eventData.data===\"object\"?eventData.data:null;const candidateGuids=[resolveGuid(eventData.formGuid),resolveGuid(eventData.id),resolveGuid(eventData.guid),resolveGuid(eventData.formId),resolveGuid(nestedData?.formGuid),resolveGuid(nestedData?.id),resolveGuid(nestedData?.guid),resolveGuid(nestedData?.formId)].filter(Boolean);const matched=candidateGuids.some(guid=>guid===trackedFormGuid);if(!matched)return;if(windowWithHubSpotState.__hubSpotFormSubmitListenerState__?.redirected){return;}windowWithHubSpotState.__hubSpotFormSubmitListenerState__.redirected=true;window.location.assign(redirectUrl);};windowWithHubSpotState.__hubSpotFormSubmitListenerState__={refCount:0,redirected:false,handler};}const listenerState=windowWithHubSpotState.__hubSpotFormSubmitListenerState__;if(listenerState.refCount===0){window.addEventListener(\"message\",listenerState.handler);}listenerState.refCount+=1;return()=>{const mountedStyle=document.getElementById(styleElementId);if(!mountedStyle)return;const nextCount=Number(mountedStyle.getAttribute(\"data-ref-count\")||\"1\")-1;if(nextCount<=0){mountedStyle.remove();}else{mountedStyle.setAttribute(\"data-ref-count\",String(nextCount));}const state=windowWithHubSpotState.__hubSpotFormSubmitListenerState__;if(!state)return;state.refCount=Math.max(0,state.refCount-1);if(state.refCount===0){window.removeEventListener(\"message\",state.handler);}};},[styleElementId]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props});});}export function withActiveNavColor(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const activeColor=\"rgba(240, 84, 84, 1)\";const[pathname,setPathname]=useState(\"/\");const normalizePath=useCallback(path=>{if(!path)return\"/\";const withLeadingSlash=path.startsWith(\"/\")?path:`/${path}`;const trimmed=withLeadingSlash.length>1?withLeadingSlash.replace(/\\/+$/,\"\"):withLeadingSlash;return trimmed||\"/\";},[]);const resolveInternalPath=useCallback(linkValue=>{if(typeof window===\"undefined\"||typeof linkValue!==\"string\"){return null;}const trimmed=linkValue.trim();if(!trimmed||trimmed.startsWith(\"#\"))return null;if(/^(mailto:|tel:|javascript:)/i.test(trimmed))return null;try{const parsed=new URL(trimmed,window.location.origin);if(parsed.origin!==window.location.origin)return null;return normalizePath(parsed.pathname);}catch{return null;}},[normalizePath]);const isActive=useMemo(()=>{const targetPath=resolveInternalPath(props.link);if(!targetPath)return false;const currentPath=normalizePath(pathname);if(targetPath===\"/\")return currentPath===\"/\";return currentPath===targetPath||currentPath.startsWith(`${targetPath}/`);},[normalizePath,pathname,props,resolveInternalPath]);useEffect(()=>{if(typeof window===\"undefined\")return;const updatePath=()=>{const nextPath=window.location.pathname||\"/\";startTransition(()=>{setPathname(prevPath=>prevPath===nextPath?prevPath:nextPath);});};updatePath();window.addEventListener(\"popstate\",updatePath);window.addEventListener(\"hashchange\",updatePath);const intervalId=window.setInterval(updatePath,200);return()=>{window.removeEventListener(\"popstate\",updatePath);window.removeEventListener(\"hashchange\",updatePath);window.clearInterval(intervalId);};},[]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,color:isActive?activeColor:props.color});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withActiveNavColor\":{\"type\":\"reactHoc\",\"name\":\"withActiveNavColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHubSpotRequiredMarkerContrast\":{\"type\":\"reactHoc\",\"name\":\"withHubSpotRequiredMarkerContrast\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Examples.map"],"mappings":"4NAA8E,SAAgB,EAAY,EAAO,CACjH,IAAM,EAAU,EAAK,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