{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/5XZHHryoN4U8fh7XIND7/EN7p0FzMqU0P2dN63TOG/S8xW2vdxg.js", "ssg:https://framerusercontent.com/modules/aaQgZy8nQ0KatCoeEIpc/z6iNgddPGeZrLkR9AkHh/KeyboardShortcuts.js"],
  "sourcesContent": ["import{fontStore as r}from\"framer\";r.loadWebFontsFromSelectors([]);export const fonts=[];export const css=[\".framer-Y43rN .framer-styles-preset-1mmtvqp:not(.rich-text-wrapper), .framer-Y43rN .framer-styles-preset-1mmtvqp.rich-text-wrapper a { --framer-link-current-text-color: #ffffff; --framer-link-current-text-decoration: none; --framer-link-hover-text-color: rgba(255, 255, 255, 0.8); --framer-link-hover-text-decoration: none; --framer-link-text-color: rgba(255, 255, 255, 0.55); --framer-link-text-decoration: none; transition: color 0.2s cubic-bezier(0.44, 0, 0.56, 1) 0s; }\"];export const className=\"framer-Y43rN\";\nexport const __FramerMetadata__ = {\"exports\":{\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}", "/*\n * Shortcuts by framer.today\n * v1.0.0\n * https://framer.today/license\n */import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{useHotkeys}from\"react-hotkeys-hook\";let hotkeyActionExecuted=false;const hotkeyToNameMap={0:\"nav-home\",1:\"nav-courses\",2:\"nav-pricing\",3:\"nav-contact\",4:\"nav-about\",l:\"nav-login\",a:\"nav-account\"};export function withMappedHotKey(Component){return function WrappedComponent(props){useHotkeys(Object.keys(hotkeyToNameMap).join(\",\"),(event,handler)=>{if(hotkeyActionExecuted)return;console.log(`Hotkey handler invoked for: ${handler.keys[0]}`);event.preventDefault();hotkeyActionExecuted=true;const pressedKey=handler.keys[0];const name=hotkeyToNameMap[pressedKey];const element=document.querySelector(`[data-framer-name=\"${name}\"]`);if(element){console.log(`Element found for ${pressedKey}: clicking now.`);element.click();}},{keyup:true},[hotkeyToNameMap]);useEffect(()=>{const resetActionFlag=()=>{hotkeyActionExecuted=false;};window.addEventListener(\"keyup\",resetActionFlag);return()=>{window.removeEventListener(\"keyup\",resetActionFlag);};},[]);return /*#__PURE__*/_jsx(Component,{...props});};}export function withSearch(Component){return function WrappedComponent(props){useHotkeys(\"s\",event=>{event.preventDefault();const hoveredElement=document.querySelector(\":hover\");if(hoveredElement){const mouseOutEvent=new Event(\"mouseout\",{bubbles:true,cancelable:true});hoveredElement.dispatchEvent(mouseOutEvent);}const buttonElement=document.querySelector('button[aria-label=\"Search Icon\"]');if(buttonElement){buttonElement.click();}});return /*#__PURE__*/_jsx(Component,{...props});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withMappedHotKey\":{\"type\":\"reactHoc\",\"name\":\"withMappedHotKey\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSearch\":{\"type\":\"reactHoc\",\"name\":\"withSearch\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./KeyboardShortcuts.map"],
  "mappings": "4KAAmCA,EAAE,0BAA0B,CAAC,CAAC,EAAS,IAAMC,EAAM,CAAC,EAAeC,EAAI,CAAC,2dAA2d,EAAeC,EAAU,eCIze,IAAIC,EAAqB,GAAYC,EAAgB,CAAC,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAS,SAASC,EAAiBC,EAAU,CAAC,OAAO,SAA0BC,EAAM,CAAC,OAAAC,EAAW,OAAO,KAAKJ,CAAe,EAAE,KAAK,GAAG,EAAE,CAACK,EAAMC,IAAU,CAAC,GAAGP,EAAqB,OAAO,QAAQ,IAAI,+BAA+BO,EAAQ,KAAK,CAAC,CAAC,EAAE,EAAED,EAAM,eAAe,EAAEN,EAAqB,GAAK,IAAMQ,EAAWD,EAAQ,KAAK,CAAC,EAAQE,EAAKR,EAAgBO,CAAU,EAAQE,EAAQ,SAAS,cAAc,sBAAsBD,CAAI,IAAI,EAAKC,IAAS,QAAQ,IAAI,qBAAqBF,CAAU,iBAAiB,EAAEE,EAAQ,MAAM,EAAG,EAAE,CAAC,MAAM,EAAI,EAAE,CAACT,CAAe,CAAC,EAAEU,EAAU,IAAI,CAAC,IAAMC,EAAgB,IAAI,CAACZ,EAAqB,EAAM,EAAE,OAAAa,EAAO,iBAAiB,QAAQD,CAAe,EAAQ,IAAI,CAACC,EAAO,oBAAoB,QAAQD,CAAe,CAAE,CAAE,EAAE,CAAC,CAAC,EAAsBE,EAAKX,EAAU,CAAC,GAAGC,CAAK,CAAC,CAAE,CAAE,CAAQ,SAASW,EAAWZ,EAAU,CAAC,OAAO,SAA0BC,EAAM,CAAC,OAAAC,EAAW,IAAIC,GAAO,CAACA,EAAM,eAAe,EAAE,IAAMU,EAAe,SAAS,cAAc,QAAQ,EAAE,GAAGA,EAAe,CAAC,IAAMC,EAAc,IAAI,MAAM,WAAW,CAAC,QAAQ,GAAK,WAAW,EAAI,CAAC,EAAED,EAAe,cAAcC,CAAa,CAAE,CAAC,IAAMC,EAAc,SAAS,cAAc,kCAAkC,EAAKA,GAAeA,EAAc,MAAM,CAAG,CAAC,EAAsBJ,EAAKX,EAAU,CAAC,GAAGC,CAAK,CAAC,CAAE,CAAE",
  "names": ["fontStore", "fonts", "css", "className", "hotkeyActionExecuted", "hotkeyToNameMap", "withMappedHotKey", "Component", "props", "useHotkeys", "event", "handler", "pressedKey", "name", "element", "ue", "resetActionFlag", "window", "p", "withSearch", "hoveredElement", "mouseOutEvent", "buttonElement"]
}
