ton icon">
${n.l10n.t("Focus Lock")}
`}extensionResourceUrl(...e){return this._webviewPanel.webview.asWebviewUri(n.Uri.joinPath(this.extensionUri,...e))}};function B(s){return s.toString().replace(/"/g,""")}var v=class{constructor(i){this.extensionUri=i}_activeView;dispose(){this._activeView?.dispose(),this._activeView=void 0}show(i,e){let t=typeof i=="string"?i:i.toString(!0);if(this._activeView)this._activeView.show(t,e);else{let r=a.create(this.extensionUri,t,e);this.registerWebviewListeners(r),this._activeView=r}}restore(i,e){let t=e?.url??"",r=a.restore(this.extensionUri,t,i);this.registerWebviewListeners(r),this._activeView??=r}registerWebviewListeners(i){i.onDispose(()=>{this._activeView===i&&(this._activeView=void 0)})}};var V="simpleBrowser.api.open",W="simpleBrowser.show",g="workbench.action.browser.open",k="simpleBrowser.useIntegratedBrowser",O=new Set(["localhost","127.0.0.1","[0:0:0:0:0:0:0:1]","[::1]","0.0.0.0","[0:0:0:0:0:0:0:0]","[::]"]),E="simpleBrowser.open";async function w(){return o.workspace.getConfiguration().get(k,!0)?(await o.commands.getCommands(!0)).includes(g):!1}async function u(s){await o.commands.executeCommand(g,s)}function R(s){let i=new v(s.extensionUri);s.subscriptions.push(i),s.subscriptions.push(o.window.registerWebviewPanelSerializer(a.viewType,{deserializeWebviewPanel:async(e,t)=>{i.restore(e,t)}})),s.subscriptions.push(o.commands.registerCommand(W,async e=>{if(await w())return u(e);e||(e=await o.window.showInputBox({placeHolder:o.l10n.t("https://example.com"),prompt:o.l10n.t("Enter url to visit")})),e&&i.show(e)})),s.subscriptions.push(o.commands.registerCommand(V,async(e,t)=>{await w()?await u(e.toString(!0)):i.show(e,t)})),s.subscriptions.push(o.window.registerExternalUriOpener(E,{canOpenExternalUri(e){let t=new URL(e.toString(!0));return O.has(t.hostname)?L()?o.ExternalUriOpenerPriority.Default:o.ExternalUriOpenerPriority.Option:o.ExternalUriOpenerPriority.None},async openExternalUri(e){if(await w())await u(e.toString(!0));else return i.show(e,{viewColumn:o.window.activeTextEditor?o.ViewColumn.Beside:o.ViewColumn.Active})}},{schemes:["http","https"],label:o.l10n.t("Open in simple browser")}))}function L(){return!(typeof process=="object"&&process.versions.node)&&o.env.uiKind===o.UIKind.Web}0&&(module.exports={activate}); //# sourceMappingURL=extension.js.map