"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([["8109"],{52913(e,t,n){n.r(t),n.d(t,{default:()=>r});var o=n(74053),a=n(2493),i=n(30761),l=n(16324);let r=[{id:"@jupyter-notebook/docmanager-extension:opener",autoStart:!0,optional:[i.INotebookPathOpener,i.INotebookShell],provides:a.IDocumentWidgetOpener,description:"Open documents in a new browser tab",activate:(e,t,n)=>{let a=o.PageConfig.getBaseUrl(),r=e.docRegistry,d=null!=t?t:i.defaultNotebookPathOpener,s=0;return new class{constructor(){this._opened=new l.Signal(this)}async open(t,i){var l,u,c;let p=null!=(l=null==i?void 0:i.type)?l:"",h=null==i?void 0:i.ref,f=null==(c=null==(u=null==n?void 0:n.userLayout)?void 0:u[p])?void 0:c.area;if("_noref"!==h&&void 0===f){let e,n=t.context.path,i=o.PathExt.extname(n),l="edit";("default"===p&&".ipynb"===i||p.includes("Notebook"))&&(t.context.sessionContext.kernelPreference.name&&await t.context.save(),l="notebooks"),p!==r.defaultWidgetFactory(n).name&&(e=new URLSearchParams({factory:p})),d.open({prefix:o.URLExt.join(a,l),path:n,searchParams:e}),t.dispose();return}t.id||(t.id=`document-manager-${++s}`),t.title.dataset={type:"document-title",...t.title.dataset},t.isAttached||e.shell.add(t,"main",i||{}),e.shell.activateById(t.id),this._opened.emit(t)}get opened(){return this._opened}}}}]}}]);