"use strict";
/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
(self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] = self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] || []).push([["node_modules_jupyter-notebook_docmanager-extension_lib_index_js-_e4b41"],{

/***/ "../node_modules/@jupyter-notebook/docmanager-extension/lib/index.js":
/*!***************************************************************************!*\
  !*** ../node_modules/@jupyter-notebook/docmanager-extension/lib/index.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/coreutils */ \"webpack/sharing/consume/default/@jupyterlab/coreutils/@jupyterlab/coreutils\");\n/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _jupyterlab_docmanager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/docmanager */ \"webpack/sharing/consume/default/@jupyterlab/docmanager/@jupyterlab/docmanager\");\n/* harmony import */ var _jupyterlab_docmanager__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_docmanager__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jupyter_notebook_application__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyter-notebook/application */ \"webpack/sharing/consume/default/@jupyter-notebook/application/@jupyter-notebook/application\");\n/* harmony import */ var _jupyter_notebook_application__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyter_notebook_application__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @lumino/signaling */ \"webpack/sharing/consume/default/@lumino/signaling/@lumino/signaling\");\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_lumino_signaling__WEBPACK_IMPORTED_MODULE_3__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n\n\n/**\n * A plugin to open documents in a new browser tab.\n *\n */\nconst opener = {\n    id: '@jupyter-notebook/docmanager-extension:opener',\n    autoStart: true,\n    optional: [_jupyter_notebook_application__WEBPACK_IMPORTED_MODULE_2__.INotebookPathOpener, _jupyter_notebook_application__WEBPACK_IMPORTED_MODULE_2__.INotebookShell],\n    provides: _jupyterlab_docmanager__WEBPACK_IMPORTED_MODULE_1__.IDocumentWidgetOpener,\n    description: 'Open documents in a new browser tab',\n    activate: (app, notebookPathOpener, notebookShell) => {\n        const baseUrl = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getBaseUrl();\n        const docRegistry = app.docRegistry;\n        const pathOpener = notebookPathOpener !== null && notebookPathOpener !== void 0 ? notebookPathOpener : _jupyter_notebook_application__WEBPACK_IMPORTED_MODULE_2__.defaultNotebookPathOpener;\n        let id = 0;\n        return new (class {\n            constructor() {\n                this._opened = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_3__.Signal(this);\n            }\n            async open(widget, options) {\n                var _a, _b, _c;\n                const widgetName = (_a = options === null || options === void 0 ? void 0 : options.type) !== null && _a !== void 0 ? _a : '';\n                const ref = options === null || options === void 0 ? void 0 : options.ref;\n                // check if there is an setting override and if it would add the widget in the main area\n                const userLayoutArea = (_c = (_b = notebookShell === null || notebookShell === void 0 ? void 0 : notebookShell.userLayout) === null || _b === void 0 ? void 0 : _b[widgetName]) === null || _c === void 0 ? void 0 : _c.area;\n                if (ref !== '_noref' && userLayoutArea === undefined) {\n                    const path = widget.context.path;\n                    const ext = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PathExt.extname(path);\n                    let route = 'edit';\n                    if ((widgetName === 'default' && ext === '.ipynb') ||\n                        widgetName.includes('Notebook')) {\n                        // make sure to save the notebook before opening it in a new tab\n                        // so the kernel info is saved (if created from the New dropdown)\n                        if (widget.context.sessionContext.kernelPreference.name) {\n                            await widget.context.save();\n                        }\n                        route = 'notebooks';\n                    }\n                    // append ?factory only if it's not the default\n                    const defaultFactory = docRegistry.defaultWidgetFactory(path);\n                    let searchParams = undefined;\n                    if (widgetName !== defaultFactory.name) {\n                        searchParams = new URLSearchParams({\n                            factory: widgetName,\n                        });\n                    }\n                    pathOpener.open({\n                        prefix: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.URLExt.join(baseUrl, route),\n                        path,\n                        searchParams,\n                    });\n                    // dispose the widget since it is not used on this page\n                    widget.dispose();\n                    return;\n                }\n                // otherwise open the document on the current page\n                if (!widget.id) {\n                    widget.id = `document-manager-${++id}`;\n                }\n                widget.title.dataset = {\n                    type: 'document-title',\n                    ...widget.title.dataset,\n                };\n                if (!widget.isAttached) {\n                    app.shell.add(widget, 'main', options || {});\n                }\n                app.shell.activateById(widget.id);\n                this._opened.emit(widget);\n            }\n            get opened() {\n                return this._opened;\n            }\n        })();\n    },\n};\n/**\n * Export the plugins as default.\n */\nconst plugins = [opener];\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (plugins);\n\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyter-notebook/docmanager-extension/lib/index.js?");

/***/ })

}]);