{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/pSyW2SmBqGkTQaJwhjfR/A6gIx5NlSwKDNMgtzd2l/Shortcuts.js"],
  "sourcesContent": ["import { jsx as e } from \"react/jsx-runtime\";\nimport r from \"react\";\nexport function withKeyboardShortcuts(t) {\n  let n = e => {\n      // Don't capture input if the user is typing in an input field or a meta key is pressed\n      if (e.target instanceof HTMLInputElement || e.shiftKey || e.ctrlKey || e.altKey || e.metaKey) return; // Save pressed keys to session storage\n      let r = JSON.parse(sessionStorage.getItem(\"pressedKeys\") || \"[]\");\n      if (r.push(e.key), r.length > 1 && r.shift(), sessionStorage.setItem(\"pressedKeys\", JSON.stringify(r)), \"undefined\" != typeof window) {\n        // Notify other components\n        let e = new CustomEvent(\"pressedKeysChanged\", {\n          detail: r\n        });\n        window.dispatchEvent(e);\n      }\n    },\n    o = () => {\n      sessionStorage.removeItem(\"pressedKeys\");\n    };\n  return s => (\"undefined\" != typeof window && r.useEffect(() => (\n  // Focus window on load\n  window.focus(), window.addEventListener(\"keydown\", n), window.addEventListener(\"beforeunload\", o), () => {\n    window.removeEventListener(\"keydown\", n), window.removeEventListener(\"beforeunload\", o);\n  }), []), /*#__PURE__*/e(t, {\n    ...s\n  }));\n}\nexport function withShortcutTrigger(t) {\n  let n = (e, r, t) => {\n    let n = e.detail; // Check if the last pressed key matches the shortcut\n    n[n.length - 1] === r && (e.preventDefault(), setTimeout(() => {\n      if (console.log(\"click\"), t.current) {\n        let e = t.current.querySelector(\"button\"),\n          n = t.current.querySelector(\"a\");\n        e ? e.click() : n ? n.click() : console.error(`\uD83E\uDD8E Error: The shortcut trigger element ${r} isn't working properly. Check the docs for help.`);\n      } else console.error(`\uD83E\uDD8E Error: The shortcut trigger element ${r} isn't working properly. Check the docs for help.`);\n      sessionStorage.removeItem(\"pressedKeys\");\n    }, 0));\n  };\n  return o => {\n    var s;\n    let i = null === (s = o.name) || void 0 === s ? void 0 : s.match(/\\[(.*?)\\]/),\n      d = \"\",\n      l = r.useRef(null);\n    return i ? d = i[1] : console.error(`\uD83E\uDD8E Error: Your shortcut trigger layer (${o.name}) is missing a key in its layer name.`), \"undefined\" != typeof window && r.useEffect(() => {\n      window.addEventListener(\"pressedKeysChanged\", e => {\n        n(e, d, l);\n      });\n    }, []), /*#__PURE__*/e(\"span\", {\n      ref: l,\n      children: /*#__PURE__*/e(t, {\n        ...o\n      })\n    });\n  };\n} /*\n  Shortcuts \u2013 keyboard-enabled navigation for Framer (https://hoferdo.link/shortcuts-framer)\n  \u00A9 2023 by Dominik Hofer (https://hoferdo.link/me \u2013 Contact: https://hoferdo.link/hi)\n  Disclaimer:\n  This software is provided as-is, without any warranty. Use of this software and its constituent components is subject to the following terms:\n  1. Upon purchase of a license (Core, Commercial or Creator), the purchaser is granted the right to use this component in an unlimited number of Framer projects that are owned by the purchaser.\n  2. Modification, redistribution, or re-use of the source code, in whole or in part, without explicit written permission from the copyright holder (Dominik Hofer) is strictly prohibited.\n  3. This component may not be used in a commercial Framer project (i.e. a project that is used to generate revenue) unless the purchaser has purchased a Commercial or Creator license.\n  4. This component may not be used in a Framer project that is owned by a third party (e.g. a client) unless the third party has purchased a license for this component.\n  5. This component may not be used in a Framer template that you plan to distribute (either for free or for sale) unless you have purchased a Creator license.\n  By using this software, you agree to these terms. Failure to comply with these terms may result in legal consequences. If you have any questions regarding these terms, please contact Dominik Hofer through the provided link above.\n  */\nexport const __FramerMetadata__ = {\n  \"exports\": {\n    \"withKeyboardShortcuts\": {\n      \"type\": \"reactHoc\",\n      \"name\": \"withKeyboardShortcuts\",\n      \"annotations\": {\n        \"framerContractVersion\": \"1\"\n      }\n    },\n    \"withShortcutTrigger\": {\n      \"type\": \"reactHoc\",\n      \"name\": \"withShortcutTrigger\",\n      \"annotations\": {\n        \"framerContractVersion\": \"1\"\n      }\n    },\n    \"__FramerMetadata__\": {\n      \"type\": \"variable\"\n    }\n  }\n};\n//# sourceMappingURL=./Shortcuts.map"],
  "mappings": "2HAEO,SAASA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