"use strict";(function(){const{contextBridge:a,ipcRenderer:i}=require("electron"),e={mac:{always:new Set(["arrowup","arrowdown","arrowleft","arrowright","backspace","delete"]),noShift:new Set(["a","c","v","x","z"]),withShift:new Set(["v","z"])},nonMac:{always:new Set(["arrowup","arrowdown","arrowleft","arrowright","home","end","backspace","delete"]),noShift:new Set(["a","c","v","x","z","y"]),withShift:new Set(["v","z"])}};window.addEventListener("keydown",r=>{if(!(r instanceof KeyboardEvent)||!r.isTrusted||r.defaultPrevented)return;const s=r.key==="Escape"||/^F\d+$/.test(r.key)||r.key.startsWith("Audio")||r.key.startsWith("Media")||r.key.startsWith("Browser");if(!(r.ctrlKey||r.altKey||r.metaKey)&&!s||r.key==="Control"||r.key==="Shift"||r.key==="Alt"||r.key==="Meta")return;const t=navigator.platform.indexOf("Mac")>=0;if(r.altKey&&!r.ctrlKey&&!r.metaKey&&(t||/^Numpad\d+$/.test(r.code)))return;if((t?r.metaKey:r.ctrlKey)&&!r.altKey){const o=r.key.toLowerCase();if([e[t?"mac":"nonMac"].always,e[t?"mac":"nonMac"][r.shiftKey?"withShift":"noShift"]].some(y=>y.has(o))||t&&r.ctrlKey&&!r.shiftKey&&o===" ")return}r.preventDefault(),r.stopPropagation(),i.send("vscode:browserView:keydown",{key:r.key,keyCode:r.keyCode,code:r.code,ctrlKey:r.ctrlKey,shiftKey:r.shiftKey,altKey:r.altKey,metaKey:r.metaKey,repeat:r.repeat})});const c={getSelectedText(){try{return window.getSelection()?.toString()??""}catch{return""}}};try{a.exposeInIsolatedWorld(999,"browserViewAPI",c)}catch(r){console.error(r)}})();

//# sourceMappingURL=https://github.com/VSCodium/sourcemaps/releases/download/stable-221e0a382c0be3a673a4e4cab0601344a0b3de3a/core-vs-platform-browserView-electron-browser-preload-browserView.js.map
