(()=>{"use strict";var e={339:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.onceDocumentLoaded=void 0,t.onceDocumentLoaded=function(e){"loading"===document.readyState||"uninitialized"===document.readyState?document.addEventListener("DOMContentLoaded",e):e()}}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,o),a.exports}(()=>{const e=o(339),t=acquireVsCodeApi(),n=function(){const e=document.getElementById("simple-browser-settings");if(e){const t=e.getAttribute("data-settings");if(t)return JSON.parse(t)}throw new Error("Could not load settings")}(),r=document.querySelector("iframe"),a=document.querySelector(".header"),c=a.querySelector(".url-input"),d=a.querySelector(".forward-button"),s=a.querySelector(".back-button"),u=a.querySelector(".reload-button"),i=a.querySelector(".open-external-button");function l(e){document.body.classList.toggle("enable-focus-lock-indicator",e)}window.addEventListener("message",(e=>{switch(e.data.type){case"focus":r.focus();break;case"didChangeFocusLockIndicatorEnabled":l(e.data.enabled)}})),(0,e.onceDocumentLoaded)((()=>{function e(e){try{const t=new URL(e);t.searchParams.append("vscodeBrowserReqId",Date.now().toString()),r.src=t.toString()}catch{r.src=e}t.setState({url:e})}setInterval((()=>{const e="IFRAME"===document.activeElement?.tagName;document.body.classList.toggle("iframe-focused",e)}),50),r.addEventListener("load",(()=>{})),c.addEventListener("change",(t=>{e(t.target.value)})),d.addEventListener("click",(()=>{history.forward()})),s.addEventListener("click",(()=>{history.back()})),i.addEventListener("click",(()=>{t.postMessage({type:"openExternal",url:c.value})})),u.addEventListener("click",(()=>{e(c.value)})),e(n.url),c.value=n.url,l(n.focusLockIndicatorEnabled)}))})()})();