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A,CAAS,CAA+B,CAA1CD,EACrC,MACE,GAAAE,EAAAC,GAAA,EAACC,MAAAA,CAAIH,UAAWA,WACd,GAAAC,EAAAC,GAAA,EAACE,EAAAA,EAAeA,CAAAA,CAACC,IAAI,uCAAuCC,SAAQ,GAACC,KAAI,MAG/E","sources":["webpack://_N_E/?a65e","webpack://_N_E/./node_modules/.pnpm/next@14.2.25_@babel+core@7.25.2_@opentelemetry+api@1.9.0_@playwright+test@1.46.1_react-dom@18_uvezhz7xw2brasxc47ilynrdsu/node_modules/next/dist/api/link.js","webpack://_N_E/./node_modules/.pnpm/react-hotkeys-hook@4.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-hotkeys-hook/dist/react-hotkeys-hook.esm.js","webpack://_N_E/./src/components/AirplaneLoadingSpinner.tsx"],"sourcesContent":["import(/* webpackMode: \"eager\", webpackExports: [\"AirplaneLoadingSpinner\"] */ \"/app/src/components/AirplaneLoadingSpinner.tsx\");\n;\nimport(/* webpackMode: \"eager\", webpackExports: [\"GlobalPageLayout\"] */ \"/app/src/components/layout/global/GlobalPageLayout.tsx\");\n","export { default } from \"../client/link\";\nexport * from \"../client/link\";\n\n//# sourceMappingURL=link.js.map","import { useContext, createContext, useState, useCallback, useRef, useLayoutEffect, useEffect } from 'react';\nimport { jsx } from 'react/jsx-runtime';\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nvar reservedModifierKeywords = ['shift', 'alt', 'meta', 'mod', 'ctrl'];\nvar mappedKeys = {\n esc: 'escape',\n \"return\": 'enter',\n '.': 'period',\n ',': 'comma',\n '-': 'slash',\n ' ': 'space',\n '`': 'backquote',\n '#': 'backslash',\n '+': 'bracketright',\n ShiftLeft: 'shift',\n ShiftRight: 'shift',\n AltLeft: 'alt',\n AltRight: 'alt',\n MetaLeft: 'meta',\n MetaRight: 'meta',\n OSLeft: 'meta',\n OSRight: 'meta',\n ControlLeft: 'ctrl',\n ControlRight: 'ctrl'\n};\nfunction mapKey(key) {\n return (mappedKeys[key] || key).trim().toLowerCase().replace(/key|digit|numpad|arrow/, '');\n}\nfunction isHotkeyModifier(key) {\n return reservedModifierKeywords.includes(key);\n}\nfunction parseKeysHookInput(keys, splitKey) {\n if (splitKey === void 0) {\n splitKey = ',';\n }\n return keys.split(splitKey);\n}\nfunction parseHotkey(hotkey, combinationKey, description) {\n if (combinationKey === void 0) {\n combinationKey = '+';\n }\n var keys = hotkey.toLocaleLowerCase().split(combinationKey).map(function (k) {\n return mapKey(k);\n });\n var modifiers = {\n alt: keys.includes('alt'),\n ctrl: keys.includes('ctrl') || keys.includes('control'),\n shift: keys.includes('shift'),\n meta: keys.includes('meta'),\n mod: keys.includes('mod')\n };\n var singleCharKeys = keys.filter(function (k) {\n return !reservedModifierKeywords.includes(k);\n });\n return _extends({}, modifiers, {\n keys: singleCharKeys,\n description: description\n });\n}\n\n(function () {\n if (typeof document !== 'undefined') {\n document.addEventListener('keydown', function (e) {\n if (e.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n pushToCurrentlyPressedKeys([mapKey(e.key), mapKey(e.code)]);\n });\n document.addEventListener('keyup', function (e) {\n if (e.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n removeFromCurrentlyPressedKeys([mapKey(e.key), mapKey(e.code)]);\n });\n }\n if (typeof window !== 'undefined') {\n window.addEventListener('blur', function () {\n currentlyPressedKeys.clear();\n });\n }\n})();\nvar currentlyPressedKeys = /*#__PURE__*/new Set();\n// https://github.com/microsoft/TypeScript/issues/17002\nfunction isReadonlyArray(value) {\n return Array.isArray(value);\n}\nfunction isHotkeyPressed(key, splitKey) {\n if (splitKey === void 0) {\n splitKey = ',';\n }\n var hotkeyArray = isReadonlyArray(key) ? key : key.split(splitKey);\n return hotkeyArray.every(function (hotkey) {\n return currentlyPressedKeys.has(hotkey.trim().toLowerCase());\n });\n}\nfunction pushToCurrentlyPressedKeys(key) {\n var hotkeyArray = Array.isArray(key) ? key : [key];\n /*\r\n Due to a weird behavior on macOS we need to clear the set if the user pressed down the meta key and presses another key.\r\n https://stackoverflow.com/questions/11818637/why-does-javascript-drop-keyup-events-when-the-metakey-is-pressed-on-mac-browser\r\n Otherwise the set will hold all ever pressed keys while the meta key is down which leads to wrong results.\r\n */\n if (currentlyPressedKeys.has('meta')) {\n currentlyPressedKeys.forEach(function (key) {\n return !isHotkeyModifier(key) && currentlyPressedKeys[\"delete\"](key.toLowerCase());\n });\n }\n hotkeyArray.forEach(function (hotkey) {\n return currentlyPressedKeys.add(hotkey.toLowerCase());\n });\n}\nfunction removeFromCurrentlyPressedKeys(key) {\n var hotkeyArray = Array.isArray(key) ? key : [key];\n /*\r\n Due to a weird behavior on macOS we need to clear the set if the user pressed down the meta key and presses another key.\r\n https://stackoverflow.com/questions/11818637/why-does-javascript-drop-keyup-events-when-the-metakey-is-pressed-on-mac-browser\r\n Otherwise the set will hold all ever pressed keys while the meta key is down which leads to wrong results.\r\n */\n if (key === 'meta') {\n currentlyPressedKeys.clear();\n } else {\n hotkeyArray.forEach(function (hotkey) {\n return currentlyPressedKeys[\"delete\"](hotkey.toLowerCase());\n });\n }\n}\n\nfunction maybePreventDefault(e, hotkey, preventDefault) {\n if (typeof preventDefault === 'function' && preventDefault(e, hotkey) || preventDefault === true) {\n e.preventDefault();\n }\n}\nfunction isHotkeyEnabled(e, hotkey, enabled) {\n if (typeof enabled === 'function') {\n return enabled(e, hotkey);\n }\n return enabled === true || enabled === undefined;\n}\nfunction isKeyboardEventTriggeredByInput(ev) {\n return isHotkeyEnabledOnTag(ev, ['input', 'textarea', 'select']);\n}\nfunction isHotkeyEnabledOnTag(_ref, enabledOnTags) {\n var target = _ref.target;\n if (enabledOnTags === void 0) {\n enabledOnTags = false;\n }\n var targetTagName = target && target.tagName;\n if (isReadonlyArray(enabledOnTags)) {\n return Boolean(targetTagName && enabledOnTags && enabledOnTags.some(function (tag) {\n return tag.toLowerCase() === targetTagName.toLowerCase();\n }));\n }\n return Boolean(targetTagName && enabledOnTags && enabledOnTags === true);\n}\nfunction isScopeActive(activeScopes, scopes) {\n if (activeScopes.length === 0 && scopes) {\n console.warn('A hotkey has the \"scopes\" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a ');\n return true;\n }\n if (!scopes) {\n return true;\n }\n return activeScopes.some(function (scope) {\n return scopes.includes(scope);\n }) || activeScopes.includes('*');\n}\nvar isHotkeyMatchingKeyboardEvent = function isHotkeyMatchingKeyboardEvent(e, hotkey, ignoreModifiers) {\n if (ignoreModifiers === void 0) {\n ignoreModifiers = false;\n }\n var alt = hotkey.alt,\n meta = hotkey.meta,\n mod = hotkey.mod,\n shift = hotkey.shift,\n ctrl = hotkey.ctrl,\n keys = hotkey.keys;\n var pressedKeyUppercase = e.key,\n code = e.code,\n ctrlKey = e.ctrlKey,\n metaKey = e.metaKey,\n shiftKey = e.shiftKey,\n altKey = e.altKey;\n var keyCode = mapKey(code);\n var pressedKey = pressedKeyUppercase.toLowerCase();\n if (!(keys != null && keys.includes(keyCode)) && !(keys != null && keys.includes(pressedKey)) && !['ctrl', 'control', 'unknown', 'meta', 'alt', 'shift', 'os'].includes(keyCode)) {\n return false;\n }\n if (!ignoreModifiers) {\n // We check the pressed keys for compatibility with the keyup event. In keyup events the modifier flags are not set.\n if (alt === !altKey && pressedKey !== 'alt') {\n return false;\n }\n if (shift === !shiftKey && pressedKey !== 'shift') {\n return false;\n }\n // Mod is a special key name that is checking for meta on macOS and ctrl on other platforms\n if (mod) {\n if (!metaKey && !ctrlKey) {\n return false;\n }\n } else {\n if (meta === !metaKey && pressedKey !== 'meta' && pressedKey !== 'os') {\n return false;\n }\n if (ctrl === !ctrlKey && pressedKey !== 'ctrl' && pressedKey !== 'control') {\n return false;\n }\n }\n }\n // All modifiers are correct, now check the key\n // If the key is set, we check for the key\n if (keys && keys.length === 1 && (keys.includes(pressedKey) || keys.includes(keyCode))) {\n return true;\n } else if (keys) {\n // Check if all keys are present in pressedDownKeys set\n return isHotkeyPressed(keys);\n } else if (!keys) {\n // If the key is not set, we only listen for modifiers, that check went alright, so we return true\n return true;\n }\n // There is nothing that matches.\n return false;\n};\n\nvar BoundHotkeysProxyProvider = /*#__PURE__*/createContext(undefined);\nvar useBoundHotkeysProxy = function useBoundHotkeysProxy() {\n return useContext(BoundHotkeysProxyProvider);\n};\nfunction BoundHotkeysProxyProviderProvider(_ref) {\n var addHotkey = _ref.addHotkey,\n removeHotkey = _ref.removeHotkey,\n children = _ref.children;\n return /*#__PURE__*/jsx(BoundHotkeysProxyProvider.Provider, {\n value: {\n addHotkey: addHotkey,\n removeHotkey: removeHotkey\n },\n children: children\n });\n}\n\nfunction deepEqual(x, y) {\n //@ts-ignore\n return x && y && typeof x === 'object' && typeof y === 'object' ? Object.keys(x).length === Object.keys(y).length &&\n //@ts-ignore\n Object.keys(x).reduce(function (isEqual, key) {\n return isEqual && deepEqual(x[key], y[key]);\n }, true) : x === y;\n}\n\nvar HotkeysContext = /*#__PURE__*/createContext({\n hotkeys: [],\n enabledScopes: [],\n toggleScope: function toggleScope() {},\n enableScope: function enableScope() {},\n disableScope: function disableScope() {}\n});\nvar useHotkeysContext = function useHotkeysContext() {\n return useContext(HotkeysContext);\n};\nvar HotkeysProvider = function HotkeysProvider(_ref) {\n var _ref$initiallyActiveS = _ref.initiallyActiveScopes,\n initiallyActiveScopes = _ref$initiallyActiveS === void 0 ? ['*'] : _ref$initiallyActiveS,\n children = _ref.children;\n var _useState = useState((initiallyActiveScopes == null ? void 0 : initiallyActiveScopes.length) > 0 ? initiallyActiveScopes : ['*']),\n internalActiveScopes = _useState[0],\n setInternalActiveScopes = _useState[1];\n var _useState2 = useState([]),\n boundHotkeys = _useState2[0],\n setBoundHotkeys = _useState2[1];\n var enableScope = useCallback(function (scope) {\n setInternalActiveScopes(function (prev) {\n if (prev.includes('*')) {\n return [scope];\n }\n return Array.from(new Set([].concat(prev, [scope])));\n });\n }, []);\n var disableScope = useCallback(function (scope) {\n setInternalActiveScopes(function (prev) {\n if (prev.filter(function (s) {\n return s !== scope;\n }).length === 0) {\n return ['*'];\n } else {\n return prev.filter(function (s) {\n return s !== scope;\n });\n }\n });\n }, []);\n var toggleScope = useCallback(function (scope) {\n setInternalActiveScopes(function (prev) {\n if (prev.includes(scope)) {\n if (prev.filter(function (s) {\n return s !== scope;\n }).length === 0) {\n return ['*'];\n } else {\n return prev.filter(function (s) {\n return s !== scope;\n });\n }\n } else {\n if (prev.includes('*')) {\n return [scope];\n }\n return Array.from(new Set([].concat(prev, [scope])));\n }\n });\n }, []);\n var addBoundHotkey = useCallback(function (hotkey) {\n setBoundHotkeys(function (prev) {\n return [].concat(prev, [hotkey]);\n });\n }, []);\n var removeBoundHotkey = useCallback(function (hotkey) {\n setBoundHotkeys(function (prev) {\n return prev.filter(function (h) {\n return !deepEqual(h, hotkey);\n });\n });\n }, []);\n return /*#__PURE__*/jsx(HotkeysContext.Provider, {\n value: {\n enabledScopes: internalActiveScopes,\n hotkeys: boundHotkeys,\n enableScope: enableScope,\n disableScope: disableScope,\n toggleScope: toggleScope\n },\n children: /*#__PURE__*/jsx(BoundHotkeysProxyProviderProvider, {\n addHotkey: addBoundHotkey,\n removeHotkey: removeBoundHotkey,\n children: children\n })\n });\n};\n\nfunction useDeepEqualMemo(value) {\n var ref = useRef(undefined);\n if (!deepEqual(ref.current, value)) {\n ref.current = value;\n }\n return ref.current;\n}\n\nvar stopPropagation = function stopPropagation(e) {\n e.stopPropagation();\n e.preventDefault();\n e.stopImmediatePropagation();\n};\nvar useSafeLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;\nfunction useHotkeys(keys, callback, options, dependencies) {\n var ref = useRef(null);\n var hasTriggeredRef = useRef(false);\n var _options = !(options instanceof Array) ? options : !(dependencies instanceof Array) ? dependencies : undefined;\n var _keys = isReadonlyArray(keys) ? keys.join(_options == null ? void 0 : _options.splitKey) : keys;\n var _deps = options instanceof Array ? options : dependencies instanceof Array ? dependencies : undefined;\n var memoisedCB = useCallback(callback, _deps != null ? _deps : []);\n var cbRef = useRef(memoisedCB);\n if (_deps) {\n cbRef.current = memoisedCB;\n } else {\n cbRef.current = callback;\n }\n var memoisedOptions = useDeepEqualMemo(_options);\n var _useHotkeysContext = useHotkeysContext(),\n enabledScopes = _useHotkeysContext.enabledScopes;\n var proxy = useBoundHotkeysProxy();\n useSafeLayoutEffect(function () {\n if ((memoisedOptions == null ? void 0 : memoisedOptions.enabled) === false || !isScopeActive(enabledScopes, memoisedOptions == null ? void 0 : memoisedOptions.scopes)) {\n return;\n }\n var listener = function listener(e, isKeyUp) {\n var _e$target;\n if (isKeyUp === void 0) {\n isKeyUp = false;\n }\n if (isKeyboardEventTriggeredByInput(e) && !isHotkeyEnabledOnTag(e, memoisedOptions == null ? void 0 : memoisedOptions.enableOnFormTags)) {\n return;\n }\n // TODO: SINCE THE EVENT IS NOW ATTACHED TO THE REF, THE ACTIVE ELEMENT CAN NEVER BE INSIDE THE REF. THE HOTKEY ONLY TRIGGERS IF THE\n // REF IS THE ACTIVE ELEMENT. THIS IS A PROBLEM SINCE FOCUSED SUB COMPONENTS WON'T TRIGGER THE HOTKEY.\n if (ref.current !== null) {\n var rootNode = ref.current.getRootNode();\n if ((rootNode instanceof Document || rootNode instanceof ShadowRoot) && rootNode.activeElement !== ref.current && !ref.current.contains(rootNode.activeElement)) {\n stopPropagation(e);\n return;\n }\n }\n if ((_e$target = e.target) != null && _e$target.isContentEditable && !(memoisedOptions != null && memoisedOptions.enableOnContentEditable)) {\n return;\n }\n parseKeysHookInput(_keys, memoisedOptions == null ? void 0 : memoisedOptions.splitKey).forEach(function (key) {\n var _hotkey$keys;\n var hotkey = parseHotkey(key, memoisedOptions == null ? void 0 : memoisedOptions.combinationKey);\n if (isHotkeyMatchingKeyboardEvent(e, hotkey, memoisedOptions == null ? void 0 : memoisedOptions.ignoreModifiers) || (_hotkey$keys = hotkey.keys) != null && _hotkey$keys.includes('*')) {\n if (memoisedOptions != null && memoisedOptions.ignoreEventWhen != null && memoisedOptions.ignoreEventWhen(e)) {\n return;\n }\n if (isKeyUp && hasTriggeredRef.current) {\n return;\n }\n maybePreventDefault(e, hotkey, memoisedOptions == null ? void 0 : memoisedOptions.preventDefault);\n if (!isHotkeyEnabled(e, hotkey, memoisedOptions == null ? void 0 : memoisedOptions.enabled)) {\n stopPropagation(e);\n return;\n }\n // Execute the user callback for that hotkey\n cbRef.current(e, hotkey);\n if (!isKeyUp) {\n hasTriggeredRef.current = true;\n }\n }\n });\n };\n var handleKeyDown = function handleKeyDown(event) {\n if (event.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n pushToCurrentlyPressedKeys(mapKey(event.code));\n if ((memoisedOptions == null ? void 0 : memoisedOptions.keydown) === undefined && (memoisedOptions == null ? void 0 : memoisedOptions.keyup) !== true || memoisedOptions != null && memoisedOptions.keydown) {\n listener(event);\n }\n };\n var handleKeyUp = function handleKeyUp(event) {\n if (event.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n removeFromCurrentlyPressedKeys(mapKey(event.code));\n hasTriggeredRef.current = false;\n if (memoisedOptions != null && memoisedOptions.keyup) {\n listener(event, true);\n }\n };\n var domNode = ref.current || (_options == null ? void 0 : _options.document) || document;\n // @ts-ignore\n domNode.addEventListener('keyup', handleKeyUp);\n // @ts-ignore\n domNode.addEventListener('keydown', handleKeyDown);\n if (proxy) {\n parseKeysHookInput(_keys, memoisedOptions == null ? void 0 : memoisedOptions.splitKey).forEach(function (key) {\n return proxy.addHotkey(parseHotkey(key, memoisedOptions == null ? void 0 : memoisedOptions.combinationKey, memoisedOptions == null ? void 0 : memoisedOptions.description));\n });\n }\n return function () {\n // @ts-ignore\n domNode.removeEventListener('keyup', handleKeyUp);\n // @ts-ignore\n domNode.removeEventListener('keydown', handleKeyDown);\n if (proxy) {\n parseKeysHookInput(_keys, memoisedOptions == null ? void 0 : memoisedOptions.splitKey).forEach(function (key) {\n return proxy.removeHotkey(parseHotkey(key, memoisedOptions == null ? void 0 : memoisedOptions.combinationKey, memoisedOptions == null ? void 0 : memoisedOptions.description));\n });\n }\n };\n }, [_keys, memoisedOptions, enabledScopes]);\n return ref;\n}\n\nfunction useRecordHotkeys() {\n var _useState = useState(new Set()),\n keys = _useState[0],\n setKeys = _useState[1];\n var _useState2 = useState(false),\n isRecording = _useState2[0],\n setIsRecording = _useState2[1];\n var handler = useCallback(function (event) {\n if (event.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n setKeys(function (prev) {\n var newKeys = new Set(prev);\n newKeys.add(mapKey(event.code));\n return newKeys;\n });\n }, []);\n var stop = useCallback(function () {\n if (typeof document !== 'undefined') {\n document.removeEventListener('keydown', handler);\n setIsRecording(false);\n }\n }, [handler]);\n var start = useCallback(function () {\n setKeys(new Set());\n if (typeof document !== 'undefined') {\n stop();\n document.addEventListener('keydown', handler);\n setIsRecording(true);\n }\n }, [handler, stop]);\n var resetKeys = useCallback(function () {\n setKeys(new Set());\n }, []);\n return [keys, {\n start: start,\n stop: stop,\n resetKeys: resetKeys,\n isRecording: isRecording\n }];\n}\n\nexport { HotkeysProvider, isHotkeyPressed, useHotkeys, useHotkeysContext, useRecordHotkeys };\n//# sourceMappingURL=react-hotkeys-hook.esm.js.map\n","'use client'\n\nimport { DotLottiePlayer } from '@dotlottie/react-player'\n\nexport type AirplaneLoadingSpinnerProps = {\n className?: string\n}\n\nexport function AirplaneLoadingSpinner({ className }: AirplaneLoadingSpinnerProps) {\n return (\n
\n \n
\n )\n}\n"],"names":["Promise","resolve","then","__webpack_require__","bind","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","reservedModifierKeywords","mappedKeys","esc","ShiftLeft","ShiftRight","AltLeft","AltRight","MetaLeft","MetaRight","OSLeft","OSRight","ControlLeft","ControlRight","mapKey","trim","toLowerCase","replace","parseKeysHookInput","keys","splitKey","split","parseHotkey","hotkey","combinationKey","description","toLocaleLowerCase","map","k","modifiers","alt","includes","ctrl","shift","meta","mod","singleCharKeys","filter","document","addEventListener","e","undefined","pushToCurrentlyPressedKeys","code","removeFromCurrentlyPressedKeys","window","currentlyPressedKeys","clear","Set","isReadonlyArray","value","Array","isArray","hotkeyArray","has","forEach","add","isHotkeyEnabledOnTag","_ref","enabledOnTags","targetTagName","tagName","Boolean","some","tag","isHotkeyMatchingKeyboardEvent","ignoreModifiers","pressedKeyUppercase","ctrlKey","metaKey","shiftKey","altKey","keyCode","pressedKey","every","BoundHotkeysProxyProvider","react__WEBPACK_IMPORTED_MODULE_0__","createContext","HotkeysContext","hotkeys","enabledScopes","toggleScope","enableScope","disableScope","stopPropagation","preventDefault","stopImmediatePropagation","useSafeLayoutEffect","useLayoutEffect","useEffect","useHotkeys","callback","options","dependencies","ref","useRef","hasTriggeredRef","_options","_keys","join","_deps","memoisedCB","useCallback","cbRef","current","memoisedOptions","deepEqual","x","y","reduce","isEqual","_useHotkeysContext","useContext","proxy","enabled","scopes","activeScopes","console","warn","scope","listener","isKeyUp","_e$target","isKeyboardEventTriggeredByInput","enableOnFormTags","rootNode","getRootNode","Document","ShadowRoot","activeElement","contains","isContentEditable","enableOnContentEditable","_hotkey$keys","ignoreEventWhen","handleKeyDown","event","keydown","keyup","handleKeyUp","domNode","addHotkey","removeEventListener","removeHotkey","AirplaneLoadingSpinner","param","className","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsx","div","DotLottiePlayer","src","autoplay","loop"],"sourceRoot":""}