/*
 * 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([["vendors-node_modules_jupyterlab_notebook-extension_lib_index_js"],{

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

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"commandEditItem\": () => (/* binding */ commandEditItem),\n/* harmony export */   \"exportPlugin\": () => (/* binding */ exportPlugin),\n/* harmony export */   \"notebookTrustItem\": () => (/* binding */ notebookTrustItem),\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/application */ \"webpack/sharing/consume/default/@jupyterlab/application/@jupyterlab/application\");\n/* harmony import */ var _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/apputils */ \"webpack/sharing/consume/default/@jupyterlab/apputils/@jupyterlab/apputils\");\n/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jupyterlab_cells__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyterlab/cells */ \"webpack/sharing/consume/default/@jupyterlab/cells/@jupyterlab/cells\");\n/* harmony import */ var _jupyterlab_cells__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_cells__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @jupyterlab/codeeditor */ \"webpack/sharing/consume/default/@jupyterlab/codeeditor/@jupyterlab/codeeditor\");\n/* harmony import */ var _jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @jupyterlab/coreutils */ \"webpack/sharing/consume/default/@jupyterlab/coreutils/@jupyterlab/coreutils\");\n/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _jupyterlab_docmanager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @jupyterlab/docmanager */ \"webpack/sharing/consume/default/@jupyterlab/docmanager/@jupyterlab/docmanager\");\n/* harmony import */ var _jupyterlab_docmanager__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_docmanager__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _jupyterlab_filebrowser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @jupyterlab/filebrowser */ \"webpack/sharing/consume/default/@jupyterlab/filebrowser/@jupyterlab/filebrowser\");\n/* harmony import */ var _jupyterlab_filebrowser__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_filebrowser__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _jupyterlab_launcher__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @jupyterlab/launcher */ \"webpack/sharing/consume/default/@jupyterlab/launcher/@jupyterlab/launcher\");\n/* harmony import */ var _jupyterlab_launcher__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_launcher__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _jupyterlab_mainmenu__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @jupyterlab/mainmenu */ \"webpack/sharing/consume/default/@jupyterlab/mainmenu/@jupyterlab/mainmenu\");\n/* harmony import */ var _jupyterlab_mainmenu__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_mainmenu__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @jupyterlab/notebook */ \"webpack/sharing/consume/default/@jupyterlab/notebook/@jupyterlab/notebook\");\n/* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _jupyterlab_property_inspector__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @jupyterlab/property-inspector */ \"webpack/sharing/consume/default/@jupyterlab/property-inspector/@jupyterlab/property-inspector\");\n/* harmony import */ var _jupyterlab_property_inspector__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_property_inspector__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @jupyterlab/rendermime */ \"webpack/sharing/consume/default/@jupyterlab/rendermime/@jupyterlab/rendermime\");\n/* harmony import */ var _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @jupyterlab/settingregistry */ \"webpack/sharing/consume/default/@jupyterlab/settingregistry/@jupyterlab/settingregistry\");\n/* harmony import */ var _jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _jupyterlab_statedb__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @jupyterlab/statedb */ \"webpack/sharing/consume/default/@jupyterlab/statedb/@jupyterlab/statedb\");\n/* harmony import */ var _jupyterlab_statedb__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_statedb__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _jupyterlab_statusbar__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @jupyterlab/statusbar */ \"webpack/sharing/consume/default/@jupyterlab/statusbar/@jupyterlab/statusbar\");\n/* harmony import */ var _jupyterlab_statusbar__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_statusbar__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @jupyterlab/translation */ \"webpack/sharing/consume/default/@jupyterlab/translation/@jupyterlab/translation\");\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_translation__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @jupyterlab/ui-components */ \"webpack/sharing/consume/default/@jupyterlab/ui-components/@jupyterlab/ui-components\");\n/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @lumino/algorithm */ \"webpack/sharing/consume/default/@lumino/algorithm/@lumino/algorithm\");\n/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_lumino_algorithm__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @lumino/coreutils */ \"webpack/sharing/consume/default/@lumino/coreutils/@lumino/coreutils\");\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _lumino_disposable__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @lumino/disposable */ \"webpack/sharing/consume/default/@lumino/disposable/@lumino/disposable\");\n/* harmony import */ var _lumino_disposable__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_lumino_disposable__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _lumino_messaging__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @lumino/messaging */ \"webpack/sharing/consume/default/@lumino/messaging/@lumino/messaging\");\n/* harmony import */ var _lumino_messaging__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_lumino_messaging__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @lumino/widgets */ \"webpack/sharing/consume/default/@lumino/widgets/@lumino/widgets\");\n/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_lumino_widgets__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _nboutput__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./nboutput */ \"../node_modules/@jupyterlab/notebook-extension/lib/nboutput.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/**\n * @packageDocumentation\n * @module notebook-extension\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * The command IDs used by the notebook plugin.\n */\nvar CommandIDs;\n(function (CommandIDs) {\n    CommandIDs.createNew = 'notebook:create-new';\n    CommandIDs.interrupt = 'notebook:interrupt-kernel';\n    CommandIDs.restart = 'notebook:restart-kernel';\n    CommandIDs.restartClear = 'notebook:restart-clear-output';\n    CommandIDs.restartAndRunToSelected = 'notebook:restart-and-run-to-selected';\n    CommandIDs.restartRunAll = 'notebook:restart-run-all';\n    CommandIDs.reconnectToKernel = 'notebook:reconnect-to-kernel';\n    CommandIDs.changeKernel = 'notebook:change-kernel';\n    CommandIDs.createConsole = 'notebook:create-console';\n    CommandIDs.createOutputView = 'notebook:create-output-view';\n    CommandIDs.clearAllOutputs = 'notebook:clear-all-cell-outputs';\n    CommandIDs.closeAndShutdown = 'notebook:close-and-shutdown';\n    CommandIDs.trust = 'notebook:trust';\n    CommandIDs.exportToFormat = 'notebook:export-to-format';\n    CommandIDs.run = 'notebook:run-cell';\n    CommandIDs.runAndAdvance = 'notebook:run-cell-and-select-next';\n    CommandIDs.runAndInsert = 'notebook:run-cell-and-insert-below';\n    CommandIDs.runInConsole = 'notebook:run-in-console';\n    CommandIDs.runAll = 'notebook:run-all-cells';\n    CommandIDs.runAllAbove = 'notebook:run-all-above';\n    CommandIDs.runAllBelow = 'notebook:run-all-below';\n    CommandIDs.renderAllMarkdown = 'notebook:render-all-markdown';\n    CommandIDs.toCode = 'notebook:change-cell-to-code';\n    CommandIDs.toMarkdown = 'notebook:change-cell-to-markdown';\n    CommandIDs.toRaw = 'notebook:change-cell-to-raw';\n    CommandIDs.cut = 'notebook:cut-cell';\n    CommandIDs.copy = 'notebook:copy-cell';\n    CommandIDs.pasteAbove = 'notebook:paste-cell-above';\n    CommandIDs.pasteBelow = 'notebook:paste-cell-below';\n    CommandIDs.pasteAndReplace = 'notebook:paste-and-replace-cell';\n    CommandIDs.moveUp = 'notebook:move-cell-up';\n    CommandIDs.moveDown = 'notebook:move-cell-down';\n    CommandIDs.clearOutputs = 'notebook:clear-cell-output';\n    CommandIDs.deleteCell = 'notebook:delete-cell';\n    CommandIDs.insertAbove = 'notebook:insert-cell-above';\n    CommandIDs.insertBelow = 'notebook:insert-cell-below';\n    CommandIDs.selectAbove = 'notebook:move-cursor-up';\n    CommandIDs.selectBelow = 'notebook:move-cursor-down';\n    CommandIDs.extendAbove = 'notebook:extend-marked-cells-above';\n    CommandIDs.extendTop = 'notebook:extend-marked-cells-top';\n    CommandIDs.extendBelow = 'notebook:extend-marked-cells-below';\n    CommandIDs.extendBottom = 'notebook:extend-marked-cells-bottom';\n    CommandIDs.selectAll = 'notebook:select-all';\n    CommandIDs.deselectAll = 'notebook:deselect-all';\n    CommandIDs.editMode = 'notebook:enter-edit-mode';\n    CommandIDs.merge = 'notebook:merge-cells';\n    CommandIDs.mergeAbove = 'notebook:merge-cell-above';\n    CommandIDs.mergeBelow = 'notebook:merge-cell-below';\n    CommandIDs.split = 'notebook:split-cell-at-cursor';\n    CommandIDs.commandMode = 'notebook:enter-command-mode';\n    CommandIDs.toggleAllLines = 'notebook:toggle-all-cell-line-numbers';\n    CommandIDs.undoCellAction = 'notebook:undo-cell-action';\n    CommandIDs.redoCellAction = 'notebook:redo-cell-action';\n    CommandIDs.markdown1 = 'notebook:change-cell-to-heading-1';\n    CommandIDs.markdown2 = 'notebook:change-cell-to-heading-2';\n    CommandIDs.markdown3 = 'notebook:change-cell-to-heading-3';\n    CommandIDs.markdown4 = 'notebook:change-cell-to-heading-4';\n    CommandIDs.markdown5 = 'notebook:change-cell-to-heading-5';\n    CommandIDs.markdown6 = 'notebook:change-cell-to-heading-6';\n    CommandIDs.hideCode = 'notebook:hide-cell-code';\n    CommandIDs.showCode = 'notebook:show-cell-code';\n    CommandIDs.hideAllCode = 'notebook:hide-all-cell-code';\n    CommandIDs.showAllCode = 'notebook:show-all-cell-code';\n    CommandIDs.hideOutput = 'notebook:hide-cell-outputs';\n    CommandIDs.showOutput = 'notebook:show-cell-outputs';\n    CommandIDs.hideAllOutputs = 'notebook:hide-all-cell-outputs';\n    CommandIDs.showAllOutputs = 'notebook:show-all-cell-outputs';\n    CommandIDs.enableOutputScrolling = 'notebook:enable-output-scrolling';\n    CommandIDs.disableOutputScrolling = 'notebook:disable-output-scrolling';\n    CommandIDs.selectLastRunCell = 'notebook:select-last-run-cell';\n    CommandIDs.replaceSelection = 'notebook:replace-selection';\n    CommandIDs.autoClosingBrackets = 'notebook:toggle-autoclosing-brackets';\n    CommandIDs.toggleCollapseCmd = 'Collapsible_Headings:Toggle_Collapse';\n    CommandIDs.collapseAllCmd = 'Collapsible_Headings:Collapse_All';\n    CommandIDs.expandAllCmd = 'Collapsible_Headings:Expand_All';\n    CommandIDs.copyToClipboard = 'notebook:copy-to-clipboard';\n})(CommandIDs || (CommandIDs = {}));\n/**\n * The name of the factory that creates notebooks.\n */\nconst FACTORY = 'Notebook';\n/**\n * The excluded Export To ...\n * (returned from nbconvert's export list)\n */\nconst FORMAT_EXCLUDE = ['notebook', 'python', 'custom'];\n/**\n * The notebook widget tracker provider.\n */\nconst trackerPlugin = {\n    id: '@jupyterlab/notebook-extension:tracker',\n    provides: _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.INotebookTracker,\n    requires: [_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.INotebookWidgetFactory, _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_15__.ITranslator],\n    optional: [\n        _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ICommandPalette,\n        _jupyterlab_filebrowser__WEBPACK_IMPORTED_MODULE_6__.IFileBrowserFactory,\n        _jupyterlab_launcher__WEBPACK_IMPORTED_MODULE_7__.ILauncher,\n        _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.ILayoutRestorer,\n        _jupyterlab_mainmenu__WEBPACK_IMPORTED_MODULE_8__.IMainMenu,\n        _jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_12__.ISettingRegistry,\n        _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ISessionContextDialogs\n    ],\n    activate: activateNotebookHandler,\n    autoStart: true\n};\n/**\n * The notebook cell factory provider.\n */\nconst factory = {\n    id: '@jupyterlab/notebook-extension:factory',\n    provides: _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookPanel.IContentFactory,\n    requires: [_jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_3__.IEditorServices],\n    autoStart: true,\n    activate: (app, editorServices) => {\n        const editorFactory = editorServices.factoryService.newInlineEditor;\n        return new _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookPanel.ContentFactory({ editorFactory });\n    }\n};\n/**\n * The notebook tools extension.\n */\nconst tools = {\n    activate: activateNotebookTools,\n    provides: _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.INotebookTools,\n    id: '@jupyterlab/notebook-extension:tools',\n    autoStart: true,\n    requires: [_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.INotebookTracker, _jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_3__.IEditorServices, _jupyterlab_statedb__WEBPACK_IMPORTED_MODULE_13__.IStateDB, _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_15__.ITranslator],\n    optional: [_jupyterlab_property_inspector__WEBPACK_IMPORTED_MODULE_10__.IPropertyInspectorProvider]\n};\n/**\n * A plugin providing a CommandEdit status item.\n */\nconst commandEditItem = {\n    id: '@jupyterlab/notebook-extension:mode-status',\n    autoStart: true,\n    requires: [_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.INotebookTracker, _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_15__.ITranslator],\n    optional: [_jupyterlab_statusbar__WEBPACK_IMPORTED_MODULE_14__.IStatusBar],\n    activate: (app, tracker, translator, statusBar) => {\n        if (!statusBar) {\n            // Automatically disable if statusbar missing\n            return;\n        }\n        const { shell } = app;\n        const item = new _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.CommandEditStatus(translator);\n        // Keep the status item up-to-date with the current notebook.\n        tracker.currentChanged.connect(() => {\n            const current = tracker.currentWidget;\n            item.model.notebook = current && current.content;\n        });\n        statusBar.registerStatusItem('@jupyterlab/notebook-extension:mode-status', {\n            item,\n            align: 'right',\n            rank: 4,\n            isActive: () => !!shell.currentWidget &&\n                !!tracker.currentWidget &&\n                shell.currentWidget === tracker.currentWidget\n        });\n    }\n};\n/**\n * A plugin providing export commands in the main menu and command palette\n */\nconst exportPlugin = {\n    id: '@jupyterlab/notebook-extension:export',\n    autoStart: true,\n    requires: [_jupyterlab_translation__WEBPACK_IMPORTED_MODULE_15__.ITranslator, _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.INotebookTracker],\n    optional: [_jupyterlab_mainmenu__WEBPACK_IMPORTED_MODULE_8__.IMainMenu, _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ICommandPalette],\n    activate: (app, translator, tracker, mainMenu, palette) => {\n        var _a;\n        const trans = translator.load('jupyterlab');\n        const { commands, shell } = app;\n        const services = app.serviceManager;\n        const isEnabled = () => {\n            return Private.isEnabled(shell, tracker);\n        };\n        commands.addCommand(CommandIDs.exportToFormat, {\n            label: args => {\n                const formatLabel = args['label'];\n                return args['isPalette']\n                    ? trans.__('Export Notebook: %1', formatLabel)\n                    : formatLabel;\n            },\n            execute: args => {\n                const current = getCurrent(tracker, shell, args);\n                if (!current) {\n                    return;\n                }\n                const url = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_4__.PageConfig.getNBConvertURL({\n                    format: args['format'],\n                    download: true,\n                    path: current.context.path\n                });\n                const child = window.open('', '_blank');\n                const { context } = current;\n                if (child) {\n                    child.opener = null;\n                }\n                if (context.model.dirty && !context.model.readOnly) {\n                    return context.save().then(() => {\n                        child === null || child === void 0 ? void 0 : child.location.assign(url);\n                    });\n                }\n                return new Promise(resolve => {\n                    child === null || child === void 0 ? void 0 : child.location.assign(url);\n                    resolve(undefined);\n                });\n            },\n            isEnabled\n        });\n        // Add a notebook group to the File menu.\n        let exportTo;\n        if (mainMenu) {\n            exportTo = (_a = mainMenu.fileMenu.items.find(item => {\n                var _a;\n                return item.type === 'submenu' &&\n                    ((_a = item.submenu) === null || _a === void 0 ? void 0 : _a.id) === 'jp-mainmenu-file-notebookexport';\n            })) === null || _a === void 0 ? void 0 : _a.submenu;\n        }\n        void services.nbconvert.getExportFormats().then(response => {\n            if (response) {\n                const formatLabels = Private.getFormatLabels(translator);\n                // Convert export list to palette and menu items.\n                const formatList = Object.keys(response);\n                formatList.forEach(function (key) {\n                    const capCaseKey = trans.__(key[0].toUpperCase() + key.substr(1));\n                    const labelStr = formatLabels[key] ? formatLabels[key] : capCaseKey;\n                    let args = {\n                        format: key,\n                        label: labelStr,\n                        isPalette: false\n                    };\n                    if (FORMAT_EXCLUDE.indexOf(key) === -1) {\n                        if (exportTo) {\n                            exportTo.addItem({\n                                command: CommandIDs.exportToFormat,\n                                args: args\n                            });\n                        }\n                        if (palette) {\n                            args = {\n                                format: key,\n                                label: labelStr,\n                                isPalette: true\n                            };\n                            const category = trans.__('Notebook Operations');\n                            palette.addItem({\n                                command: CommandIDs.exportToFormat,\n                                category,\n                                args\n                            });\n                        }\n                    }\n                });\n            }\n        });\n    }\n};\n/**\n * A plugin that adds a notebook trust status item to the status bar.\n */\nconst notebookTrustItem = {\n    id: '@jupyterlab/notebook-extension:trust-status',\n    autoStart: true,\n    requires: [_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.INotebookTracker, _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_15__.ITranslator],\n    optional: [_jupyterlab_statusbar__WEBPACK_IMPORTED_MODULE_14__.IStatusBar],\n    activate: (app, tracker, tranlator, statusBar) => {\n        if (!statusBar) {\n            // Automatically disable if statusbar missing\n            return;\n        }\n        const { shell } = app;\n        const item = new _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookTrustStatus(tranlator);\n        // Keep the status item up-to-date with the current notebook.\n        tracker.currentChanged.connect(() => {\n            const current = tracker.currentWidget;\n            item.model.notebook = current && current.content;\n        });\n        statusBar.registerStatusItem('@jupyterlab/notebook-extension:trust-status', {\n            item,\n            align: 'right',\n            rank: 3,\n            isActive: () => !!shell.currentWidget &&\n                !!tracker.currentWidget &&\n                shell.currentWidget === tracker.currentWidget\n        });\n    }\n};\n/**\n * The notebook widget factory provider.\n */\nconst widgetFactoryPlugin = {\n    id: '@jupyterlab/notebook-extension:widget-factory',\n    provides: _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.INotebookWidgetFactory,\n    requires: [\n        _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookPanel.IContentFactory,\n        _jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_3__.IEditorServices,\n        _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_11__.IRenderMimeRegistry,\n        _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ISessionContextDialogs,\n        _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_15__.ITranslator\n    ],\n    activate: activateWidgetFactory,\n    autoStart: true\n};\n/**\n * The cloned output provider.\n */\nconst clonedOutputsPlugin = {\n    id: '@jupyterlab/notebook-extension:cloned-outputs',\n    requires: [_jupyterlab_docmanager__WEBPACK_IMPORTED_MODULE_5__.IDocumentManager, _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.INotebookTracker, _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_15__.ITranslator],\n    optional: [_jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.ILayoutRestorer],\n    activate: activateClonedOutputs,\n    autoStart: true\n};\n/**\n * A plugin for code consoles functionalities.\n */\nconst codeConsolePlugin = {\n    id: '@jupyterlab/notebook-extension:code-console',\n    requires: [_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.INotebookTracker, _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_15__.ITranslator],\n    activate: activateCodeConsole,\n    autoStart: true\n};\n/**\n * A plugin to copy CodeCell outputs.\n */\nconst copyOutputPlugin = {\n    id: '@jupyterlab/notebook-extensions:copy-output',\n    activate: activateCopyOutput,\n    requires: [_jupyterlab_translation__WEBPACK_IMPORTED_MODULE_15__.ITranslator, _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.INotebookTracker],\n    autoStart: true\n};\n/**\n * Export the plugins as default.\n */\nconst plugins = [\n    factory,\n    trackerPlugin,\n    exportPlugin,\n    tools,\n    commandEditItem,\n    notebookTrustItem,\n    widgetFactoryPlugin,\n    _nboutput__WEBPACK_IMPORTED_MODULE_22__.logNotebookOutput,\n    clonedOutputsPlugin,\n    codeConsolePlugin,\n    copyOutputPlugin\n];\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (plugins);\n/**\n * Activate the notebook tools extension.\n */\nfunction activateNotebookTools(app, tracker, editorServices, state, translator, inspectorProvider) {\n    const trans = translator.load('jupyterlab');\n    const id = 'notebook-tools';\n    const notebookTools = new _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookTools({ tracker, translator });\n    const activeCellTool = new _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookTools.ActiveCellTool();\n    const slideShow = _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookTools.createSlideShowSelector(translator);\n    const editorFactory = editorServices.factoryService.newInlineEditor;\n    const cellMetadataEditor = new _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookTools.CellMetadataEditorTool({\n        editorFactory,\n        collapsed: false,\n        translator\n    });\n    const notebookMetadataEditor = new _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookTools.NotebookMetadataEditorTool({\n        editorFactory,\n        translator\n    });\n    const services = app.serviceManager;\n    // Create message hook for triggers to save to the database.\n    const hook = (sender, message) => {\n        switch (message.type) {\n            case 'activate-request':\n                void state.save(id, { open: true });\n                break;\n            case 'after-hide':\n            case 'close-request':\n                void state.remove(id);\n                break;\n            default:\n                break;\n        }\n        return true;\n    };\n    const optionsMap = {};\n    optionsMap.None = null;\n    void services.nbconvert.getExportFormats().then(response => {\n        if (response) {\n            /**\n             * The excluded Cell Inspector Raw NbConvert Formats\n             * (returned from nbconvert's export list)\n             */\n            const rawFormatExclude = [\n                'pdf',\n                'slides',\n                'script',\n                'notebook',\n                'custom'\n            ];\n            let optionValueArray = [\n                [trans.__('PDF'), 'pdf'],\n                [trans.__('Slides'), 'slides'],\n                [trans.__('Script'), 'script'],\n                [trans.__('Notebook'), 'notebook'],\n                [trans.__('Custom'), 'custom']\n            ];\n            // convert exportList to palette and menu items\n            const formatList = Object.keys(response);\n            const formatLabels = Private.getFormatLabels(translator);\n            formatList.forEach(function (key) {\n                if (rawFormatExclude.indexOf(key) === -1) {\n                    const altOption = trans.__(key[0].toUpperCase() + key.substr(1));\n                    const option = formatLabels[key] ? formatLabels[key] : altOption;\n                    const mimeTypeValue = response[key].output_mimetype;\n                    optionValueArray.push([option, mimeTypeValue]);\n                }\n            });\n            const nbConvert = _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookTools.createNBConvertSelector(optionValueArray, translator);\n            notebookTools.addItem({ tool: nbConvert, section: 'common', rank: 3 });\n        }\n    });\n    notebookTools.title.icon = _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_16__.buildIcon;\n    notebookTools.title.caption = trans.__('Notebook Tools');\n    notebookTools.id = id;\n    notebookTools.addItem({ tool: activeCellTool, section: 'common', rank: 1 });\n    notebookTools.addItem({ tool: slideShow, section: 'common', rank: 2 });\n    notebookTools.addItem({\n        tool: cellMetadataEditor,\n        section: 'advanced',\n        rank: 1\n    });\n    notebookTools.addItem({\n        tool: notebookMetadataEditor,\n        section: 'advanced',\n        rank: 2\n    });\n    _lumino_messaging__WEBPACK_IMPORTED_MODULE_20__.MessageLoop.installMessageHook(notebookTools, hook);\n    if (inspectorProvider) {\n        tracker.widgetAdded.connect((sender, panel) => {\n            const inspector = inspectorProvider.register(panel);\n            inspector.render(notebookTools);\n        });\n    }\n    return notebookTools;\n}\n/**\n * Activate the notebook widget factory.\n */\nfunction activateWidgetFactory(app, contentFactory, editorServices, rendermime, sessionContextDialogs, translator) {\n    const factory = new _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookWidgetFactory({\n        name: FACTORY,\n        fileTypes: ['notebook'],\n        modelName: 'notebook',\n        defaultFor: ['notebook'],\n        preferKernel: true,\n        canStartKernel: true,\n        rendermime: rendermime,\n        contentFactory,\n        editorConfig: _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.StaticNotebook.defaultEditorConfig,\n        notebookConfig: _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.StaticNotebook.defaultNotebookConfig,\n        mimeTypeService: editorServices.mimeTypeService,\n        sessionDialogs: sessionContextDialogs,\n        translator: translator\n    });\n    app.docRegistry.addWidgetFactory(factory);\n    return factory;\n}\n/**\n * Activate the plugin to create and track cloned outputs.\n */\nfunction activateClonedOutputs(app, docManager, notebookTracker, translator, restorer) {\n    const trans = translator.load('jupyterlab');\n    const clonedOutputs = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.WidgetTracker({\n        namespace: 'cloned-outputs'\n    });\n    if (restorer) {\n        void restorer.restore(clonedOutputs, {\n            command: CommandIDs.createOutputView,\n            args: widget => ({\n                path: widget.content.path,\n                index: widget.content.index\n            }),\n            name: widget => `${widget.content.path}:${widget.content.index}`,\n            when: notebookTracker.restored // After the notebook widgets (but not contents).\n        });\n    }\n    const { commands, shell } = app;\n    const isEnabledAndSingleSelected = () => {\n        return Private.isEnabledAndSingleSelected(shell, notebookTracker);\n    };\n    commands.addCommand(CommandIDs.createOutputView, {\n        label: trans.__('Create New View for Output'),\n        execute: async (args) => {\n            var _a;\n            let cell;\n            let current;\n            // If we are given a notebook path and cell index, then\n            // use that, otherwise use the current active cell.\n            const path = args.path;\n            let index = args.index;\n            if (path && index !== undefined && index !== null) {\n                current = docManager.findWidget(path, FACTORY);\n                if (!current) {\n                    return;\n                }\n            }\n            else {\n                current = notebookTracker.currentWidget;\n                if (!current) {\n                    return;\n                }\n                cell = current.content.activeCell;\n                index = current.content.activeCellIndex;\n            }\n            // Create a MainAreaWidget\n            const content = new Private.ClonedOutputArea({\n                notebook: current,\n                cell,\n                index,\n                translator\n            });\n            const widget = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.MainAreaWidget({ content });\n            current.context.addSibling(widget, {\n                ref: current.id,\n                mode: 'split-bottom'\n            });\n            const updateCloned = () => {\n                void clonedOutputs.save(widget);\n            };\n            current.context.pathChanged.connect(updateCloned);\n            (_a = current.context.model) === null || _a === void 0 ? void 0 : _a.cells.changed.connect(updateCloned);\n            // Add the cloned output to the output widget tracker.\n            void clonedOutputs.add(widget);\n            // Remove the output view if the parent notebook is closed.\n            current.content.disposed.connect(() => {\n                var _a;\n                current.context.pathChanged.disconnect(updateCloned);\n                (_a = current.context.model) === null || _a === void 0 ? void 0 : _a.cells.changed.disconnect(updateCloned);\n                widget.dispose();\n            });\n        },\n        isEnabled: isEnabledAndSingleSelected\n    });\n}\n/**\n * Activate the plugin to add code console functionalities\n */\nfunction activateCodeConsole(app, tracker, translator) {\n    const trans = translator.load('jupyterlab');\n    const { commands, shell } = app;\n    const isEnabled = () => Private.isEnabled(shell, tracker);\n    commands.addCommand(CommandIDs.createConsole, {\n        label: trans.__('New Console for Notebook'),\n        execute: args => {\n            const current = tracker.currentWidget;\n            if (!current) {\n                return;\n            }\n            return Private.createConsole(commands, current, args['activate']);\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.runInConsole, {\n        label: trans.__('Run Selected Text or Current Line in Console'),\n        execute: async (args) => {\n            var _a, _b;\n            // Default to not activating the notebook (thereby putting the notebook\n            // into command mode)\n            const current = tracker.currentWidget;\n            if (!current) {\n                return;\n            }\n            const { context, content } = current;\n            const cell = content.activeCell;\n            const metadata = cell === null || cell === void 0 ? void 0 : cell.model.metadata.toJSON();\n            const path = context.path;\n            // ignore action in non-code cell\n            if (!cell || cell.model.type !== 'code') {\n                return;\n            }\n            let code;\n            const editor = cell.editor;\n            const selection = editor.getSelection();\n            const { start, end } = selection;\n            const selected = start.column !== end.column || start.line !== end.line;\n            if (selected) {\n                // Get the selected code from the editor.\n                const start = editor.getOffsetAt(selection.start);\n                const end = editor.getOffsetAt(selection.end);\n                code = editor.model.value.text.substring(start, end);\n            }\n            else {\n                // no selection, find the complete statement around the current line\n                const cursor = editor.getCursorPosition();\n                const srcLines = editor.model.value.text.split('\\n');\n                let curLine = selection.start.line;\n                while (curLine < editor.lineCount &&\n                    !srcLines[curLine].replace(/\\s/g, '').length) {\n                    curLine += 1;\n                }\n                // if curLine > 0, we first do a search from beginning\n                let fromFirst = curLine > 0;\n                let firstLine = 0;\n                let lastLine = firstLine + 1;\n                // eslint-disable-next-line\n                while (true) {\n                    code = srcLines.slice(firstLine, lastLine).join('\\n');\n                    const reply = await ((_b = (_a = current.context.sessionContext.session) === null || _a === void 0 ? void 0 : _a.kernel) === null || _b === void 0 ? void 0 : _b.requestIsComplete({\n                        // ipython needs an empty line at the end to correctly identify completeness of indented code\n                        code: code + '\\n\\n'\n                    }));\n                    if ((reply === null || reply === void 0 ? void 0 : reply.content.status) === 'complete') {\n                        if (curLine < lastLine) {\n                            // we find a block of complete statement containing the current line, great!\n                            while (lastLine < editor.lineCount &&\n                                !srcLines[lastLine].replace(/\\s/g, '').length) {\n                                lastLine += 1;\n                            }\n                            editor.setCursorPosition({\n                                line: lastLine,\n                                column: cursor.column\n                            });\n                            break;\n                        }\n                        else {\n                            // discard the complete statement before the current line and continue\n                            firstLine = lastLine;\n                            lastLine = firstLine + 1;\n                        }\n                    }\n                    else if (lastLine < editor.lineCount) {\n                        // if incomplete and there are more lines, add the line and check again\n                        lastLine += 1;\n                    }\n                    else if (fromFirst) {\n                        // we search from the first line and failed, we search again from current line\n                        firstLine = curLine;\n                        lastLine = curLine + 1;\n                        fromFirst = false;\n                    }\n                    else {\n                        // if we have searched both from first line and from current line and we\n                        // cannot find anything, we submit the current line.\n                        code = srcLines[curLine];\n                        while (curLine + 1 < editor.lineCount &&\n                            !srcLines[curLine + 1].replace(/\\s/g, '').length) {\n                            curLine += 1;\n                        }\n                        editor.setCursorPosition({\n                            line: curLine + 1,\n                            column: cursor.column\n                        });\n                        break;\n                    }\n                }\n            }\n            if (!code) {\n                return;\n            }\n            await commands.execute('console:open', {\n                activate: false,\n                insertMode: 'split-bottom',\n                path\n            });\n            await commands.execute('console:inject', {\n                activate: false,\n                code,\n                path,\n                metadata\n            });\n        },\n        isEnabled\n    });\n}\n/**\n * Activate the output copying extension\n */\nfunction activateCopyOutput(app, translator, tracker) {\n    const trans = translator.load('jupyterlab');\n    /**\n     * Copy the contents of an HTMLElement to the system clipboard\n     */\n    function copyElement(e) {\n        const sel = window.getSelection();\n        if (sel == null) {\n            return;\n        }\n        // Save the current selection.\n        const savedRanges = [];\n        for (let i = 0; i < sel.rangeCount; ++i) {\n            savedRanges[i] = sel.getRangeAt(i).cloneRange();\n        }\n        const range = document.createRange();\n        range.selectNodeContents(e);\n        sel.removeAllRanges();\n        sel.addRange(range);\n        document.execCommand('copy');\n        // Restore the saved selection.\n        sel.removeAllRanges();\n        savedRanges.forEach(r => sel.addRange(r));\n    }\n    app.commands.addCommand(CommandIDs.copyToClipboard, {\n        label: trans.__('Copy Output to Clipboard'),\n        execute: args => {\n            var _a;\n            const cell = (_a = tracker.currentWidget) === null || _a === void 0 ? void 0 : _a.content.activeCell;\n            if (cell == null) {\n                return;\n            }\n            const output = cell.outputArea.outputTracker.currentWidget;\n            if (output == null) {\n                return;\n            }\n            const outputAreaAreas = output.node.getElementsByClassName('jp-OutputArea-output');\n            if (outputAreaAreas.length > 0) {\n                const area = outputAreaAreas[0];\n                copyElement(area);\n            }\n        }\n    });\n    app.contextMenu.addItem({\n        command: CommandIDs.copyToClipboard,\n        selector: '.jp-OutputArea-child',\n        rank: 0\n    });\n}\n/**\n * Activate the notebook handler extension.\n */\nfunction activateNotebookHandler(app, factory, translator, palette, browserFactory, launcher, restorer, mainMenu, settingRegistry, sessionDialogs) {\n    const trans = translator.load('jupyterlab');\n    const services = app.serviceManager;\n    const { commands } = app;\n    const tracker = new _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookTracker({ namespace: 'notebook' });\n    // Fetch settings if possible.\n    const fetchSettings = settingRegistry\n        ? settingRegistry.load(trackerPlugin.id)\n        : Promise.reject(new Error(`No setting registry for ${trackerPlugin.id}`));\n    // Handle state restoration.\n    if (restorer) {\n        fetchSettings\n            .then(settings => {\n            updateConfig(settings);\n            settings.changed.connect(() => {\n                updateConfig(settings);\n            });\n            commands.addCommand(CommandIDs.autoClosingBrackets, {\n                execute: args => {\n                    var _a;\n                    const codeConfig = settings.get('codeCellConfig')\n                        .composite;\n                    const markdownConfig = settings.get('markdownCellConfig')\n                        .composite;\n                    const rawConfig = settings.get('rawCellConfig')\n                        .composite;\n                    const anyToggled = codeConfig.autoClosingBrackets ||\n                        markdownConfig.autoClosingBrackets ||\n                        rawConfig.autoClosingBrackets;\n                    const toggled = !!((_a = args['force']) !== null && _a !== void 0 ? _a : !anyToggled);\n                    [\n                        codeConfig.autoClosingBrackets,\n                        markdownConfig.autoClosingBrackets,\n                        rawConfig.autoClosingBrackets\n                    ] = [toggled, toggled, toggled];\n                    void settings.set('codeCellConfig', codeConfig);\n                    void settings.set('markdownCellConfig', markdownConfig);\n                    void settings.set('rawCellConfig', rawConfig);\n                },\n                label: trans.__('Auto Close Brackets for All Notebook Cell Types'),\n                isToggled: () => ['codeCellConfig', 'markdownCellConfig', 'rawCellConfig'].some(x => settings.get(x).composite.autoClosingBrackets)\n            });\n        })\n            .catch((reason) => {\n            console.warn(reason.message);\n            updateTracker({\n                editorConfig: factory.editorConfig,\n                notebookConfig: factory.notebookConfig,\n                kernelShutdown: factory.shutdownOnClose\n            });\n        });\n        void restorer.restore(tracker, {\n            command: 'docmanager:open',\n            args: panel => ({ path: panel.context.path, factory: FACTORY }),\n            name: panel => panel.context.path,\n            when: services.ready\n        });\n    }\n    const registry = app.docRegistry;\n    registry.addModelFactory(new _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookModelFactory({}));\n    addCommands(app, tracker, translator, sessionDialogs);\n    if (palette) {\n        populatePalette(palette, translator);\n    }\n    let id = 0; // The ID counter for notebook panels.\n    const ft = app.docRegistry.getFileType('notebook');\n    factory.widgetCreated.connect((sender, widget) => {\n        var _a, _b;\n        // If the notebook panel does not have an ID, assign it one.\n        widget.id = widget.id || `notebook-${++id}`;\n        // Set up the title icon\n        widget.title.icon = ft === null || ft === void 0 ? void 0 : ft.icon;\n        widget.title.iconClass = (_a = ft === null || ft === void 0 ? void 0 : ft.iconClass) !== null && _a !== void 0 ? _a : '';\n        widget.title.iconLabel = (_b = ft === null || ft === void 0 ? void 0 : ft.iconLabel) !== null && _b !== void 0 ? _b : '';\n        // Notify the widget tracker if restore data needs to update.\n        widget.context.pathChanged.connect(() => {\n            void tracker.save(widget);\n        });\n        // Add the notebook panel to the tracker.\n        void tracker.add(widget);\n    });\n    /**\n     * Update the settings of the current tracker.\n     */\n    function updateTracker(options) {\n        tracker.forEach(widget => {\n            widget.setConfig(options);\n        });\n    }\n    /**\n     * Update the setting values.\n     */\n    function updateConfig(settings) {\n        const code = Object.assign(Object.assign({}, _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.StaticNotebook.defaultEditorConfig.code), settings.get('codeCellConfig').composite);\n        const markdown = Object.assign(Object.assign({}, _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.StaticNotebook.defaultEditorConfig.markdown), settings.get('markdownCellConfig').composite);\n        const raw = Object.assign(Object.assign({}, _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.StaticNotebook.defaultEditorConfig.raw), settings.get('rawCellConfig').composite);\n        factory.editorConfig = { code, markdown, raw };\n        factory.notebookConfig = {\n            scrollPastEnd: settings.get('scrollPastEnd').composite,\n            defaultCell: settings.get('defaultCell').composite,\n            recordTiming: settings.get('recordTiming').composite,\n            numberCellsToRenderDirectly: settings.get('numberCellsToRenderDirectly')\n                .composite,\n            renderCellOnIdle: settings.get('renderCellOnIdle').composite,\n            observedTopMargin: settings.get('observedTopMargin').composite,\n            observedBottomMargin: settings.get('observedBottomMargin')\n                .composite,\n            maxNumberOutputs: settings.get('maxNumberOutputs').composite\n        };\n        factory.shutdownOnClose = settings.get('kernelShutdown')\n            .composite;\n        updateTracker({\n            editorConfig: factory.editorConfig,\n            notebookConfig: factory.notebookConfig,\n            kernelShutdown: factory.shutdownOnClose\n        });\n    }\n    // Add main menu notebook menu.\n    if (mainMenu) {\n        populateMenus(app, mainMenu, tracker, translator, sessionDialogs);\n    }\n    // Utility function to create a new notebook.\n    const createNew = (cwd, kernelName) => {\n        return commands\n            .execute('docmanager:new-untitled', { path: cwd, type: 'notebook' })\n            .then(model => {\n            if (model != undefined) {\n                return commands.execute('docmanager:open', {\n                    path: model.path,\n                    factory: FACTORY,\n                    kernel: { name: kernelName }\n                });\n            }\n        });\n    };\n    // Add a command for creating a new notebook.\n    commands.addCommand(CommandIDs.createNew, {\n        label: args => {\n            var _a, _b, _c;\n            const kernelName = args['kernelName'] || '';\n            if (args['isLauncher'] && args['kernelName'] && services.kernelspecs) {\n                return ((_c = (_b = (_a = services.kernelspecs.specs) === null || _a === void 0 ? void 0 : _a.kernelspecs[kernelName]) === null || _b === void 0 ? void 0 : _b.display_name) !== null && _c !== void 0 ? _c : '');\n            }\n            if (args['isPalette']) {\n                return trans.__('New Notebook');\n            }\n            return trans.__('Notebook');\n        },\n        caption: trans.__('Create a new notebook'),\n        icon: args => (args['isPalette'] ? undefined : _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_16__.notebookIcon),\n        execute: args => {\n            const cwd = args['cwd'] ||\n                (browserFactory ? browserFactory.defaultBrowser.model.path : '');\n            const kernelName = args['kernelName'] || '';\n            return createNew(cwd, kernelName);\n        }\n    });\n    // Add a launcher item if the launcher is available.\n    if (launcher) {\n        void services.ready.then(() => {\n            let disposables = null;\n            const onSpecsChanged = () => {\n                if (disposables) {\n                    disposables.dispose();\n                    disposables = null;\n                }\n                const specs = services.kernelspecs.specs;\n                if (!specs) {\n                    return;\n                }\n                disposables = new _lumino_disposable__WEBPACK_IMPORTED_MODULE_19__.DisposableSet();\n                const baseUrl = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_4__.PageConfig.getBaseUrl();\n                for (const name in specs.kernelspecs) {\n                    const rank = name === specs.default ? 0 : Infinity;\n                    const spec = specs.kernelspecs[name];\n                    let kernelIconUrl = spec.resources['logo-64x64'];\n                    if (kernelIconUrl) {\n                        const index = kernelIconUrl.indexOf('kernelspecs');\n                        kernelIconUrl = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_4__.URLExt.join(baseUrl, kernelIconUrl.slice(index));\n                    }\n                    disposables.add(launcher.add({\n                        command: CommandIDs.createNew,\n                        args: { isLauncher: true, kernelName: name },\n                        category: trans.__('Notebook'),\n                        rank,\n                        kernelIconUrl,\n                        metadata: {\n                            kernel: _lumino_coreutils__WEBPACK_IMPORTED_MODULE_18__.JSONExt.deepCopy(spec.metadata || {})\n                        }\n                    }));\n                }\n            };\n            onSpecsChanged();\n            services.kernelspecs.specsChanged.connect(onSpecsChanged);\n        });\n    }\n    return tracker;\n}\n// Get the current widget and activate unless the args specify otherwise.\nfunction getCurrent(tracker, shell, args) {\n    const widget = tracker.currentWidget;\n    const activate = args['activate'] !== false;\n    if (activate && widget) {\n        shell.activateById(widget.id);\n    }\n    return widget;\n}\n/**\n * Add the notebook commands to the application's command registry.\n */\nfunction addCommands(app, tracker, translator, sessionDialogs) {\n    const trans = translator.load('jupyterlab');\n    const { commands, shell } = app;\n    sessionDialogs = sessionDialogs !== null && sessionDialogs !== void 0 ? sessionDialogs : _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.sessionContextDialogs;\n    const isEnabled = () => {\n        return Private.isEnabled(shell, tracker);\n    };\n    const isEnabledAndSingleSelected = () => {\n        return Private.isEnabledAndSingleSelected(shell, tracker);\n    };\n    const refreshCellCollapsed = (notebook) => {\n        var _a, _b;\n        for (const cell of notebook.widgets) {\n            if (cell instanceof _jupyterlab_cells__WEBPACK_IMPORTED_MODULE_2__.MarkdownCell && cell.headingCollapsed) {\n                _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.setHeadingCollapse(cell, true, notebook);\n            }\n            if (cell.model.id === ((_b = (_a = notebook.activeCell) === null || _a === void 0 ? void 0 : _a.model) === null || _b === void 0 ? void 0 : _b.id)) {\n                _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.expandParent(cell, notebook);\n            }\n        }\n    };\n    const isEnabledAndHeadingSelected = () => {\n        return Private.isEnabledAndHeadingSelected(shell, tracker);\n    };\n    // Set up collapse signal for each header cell in a notebook\n    tracker.currentChanged.connect((sender, panel) => {\n        var _a, _b;\n        if (!((_b = (_a = panel === null || panel === void 0 ? void 0 : panel.content) === null || _a === void 0 ? void 0 : _a.model) === null || _b === void 0 ? void 0 : _b.cells)) {\n            return;\n        }\n        panel.content.model.cells.changed.connect((list, args) => {\n            const cell = panel.content.widgets[args.newIndex];\n            if (cell instanceof _jupyterlab_cells__WEBPACK_IMPORTED_MODULE_2__.MarkdownCell &&\n                (args.type === 'add' || args.type === 'set')) {\n                cell.toggleCollapsedSignal.connect((newCell, collapsing) => {\n                    _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.setHeadingCollapse(newCell, collapsing, panel.content);\n                });\n            }\n            // Might be overkill to refresh this every time, but\n            // it helps to keep the collapse state consistent.\n            refreshCellCollapsed(panel.content);\n        });\n        panel.content.activeCellChanged.connect((notebook, cell) => {\n            _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.expandParent(cell, notebook);\n        });\n    });\n    commands.addCommand(CommandIDs.runAndAdvance, {\n        label: trans.__('Run Selected Cells'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                const { context, content } = current;\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.runAndAdvance(content, context.sessionContext);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.run, {\n        label: trans.__(\"Run Selected Cells and Don't Advance\"),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                const { context, content } = current;\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.run(content, context.sessionContext);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.runAndInsert, {\n        label: trans.__('Run Selected Cells and Insert Below'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                const { context, content } = current;\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.runAndInsert(content, context.sessionContext);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.runAll, {\n        label: trans.__('Run All Cells'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                const { context, content } = current;\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.runAll(content, context.sessionContext);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.runAllAbove, {\n        label: trans.__('Run All Above Selected Cell'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                const { context, content } = current;\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.runAllAbove(content, context.sessionContext);\n            }\n        },\n        isEnabled: () => {\n            // Can't run above if there are multiple cells selected,\n            // or if we are at the top of the notebook.\n            return (isEnabledAndSingleSelected() &&\n                tracker.currentWidget.content.activeCellIndex !== 0);\n        }\n    });\n    commands.addCommand(CommandIDs.runAllBelow, {\n        label: trans.__('Run Selected Cell and All Below'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                const { context, content } = current;\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.runAllBelow(content, context.sessionContext);\n            }\n        },\n        isEnabled: () => {\n            // Can't run below if there are multiple cells selected,\n            // or if we are at the bottom of the notebook.\n            return (isEnabledAndSingleSelected() &&\n                tracker.currentWidget.content.activeCellIndex !==\n                    tracker.currentWidget.content.widgets.length - 1);\n        }\n    });\n    commands.addCommand(CommandIDs.renderAllMarkdown, {\n        label: trans.__('Render All Markdown Cells'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                const { context, content } = current;\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.renderAllMarkdown(content, context.sessionContext);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.restart, {\n        label: trans.__('Restart Kernel…'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return sessionDialogs.restart(current.sessionContext, translator);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.closeAndShutdown, {\n        label: trans.__('Close and Shut Down'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (!current) {\n                return;\n            }\n            const fileName = current.title.label;\n            return (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.showDialog)({\n                title: trans.__('Shut down the notebook?'),\n                body: trans.__('Are you sure you want to close \"%1\"?', fileName),\n                buttons: [_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Dialog.cancelButton(), _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Dialog.warnButton()]\n            }).then(result => {\n                if (result.button.accept) {\n                    return current.context.sessionContext.shutdown().then(() => {\n                        current.dispose();\n                    });\n                }\n            });\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.trust, {\n        label: () => trans.__('Trust Notebook'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                const { context, content } = current;\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.trust(content).then(() => context.save());\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.restartClear, {\n        label: trans.__('Restart Kernel and Clear All Outputs…'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                const { content, sessionContext } = current;\n                return sessionDialogs.restart(sessionContext, translator).then(() => {\n                    _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.clearAllOutputs(content);\n                });\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.restartAndRunToSelected, {\n        label: trans.__('Restart Kernel and Run up to Selected Cell…'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                const { context, content } = current;\n                return sessionDialogs\n                    .restart(current.sessionContext, translator)\n                    .then(restarted => {\n                    if (restarted) {\n                        void _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.runAllAbove(content, context.sessionContext).then(executed => {\n                            if (executed || content.activeCellIndex === 0) {\n                                void _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.run(content, context.sessionContext);\n                            }\n                        });\n                    }\n                });\n            }\n        },\n        isEnabled: isEnabledAndSingleSelected\n    });\n    commands.addCommand(CommandIDs.restartRunAll, {\n        label: trans.__('Restart Kernel and Run All Cells…'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                const { context, content, sessionContext } = current;\n                return sessionDialogs\n                    .restart(sessionContext, translator)\n                    .then(restarted => {\n                    if (restarted) {\n                        void _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.runAll(content, context.sessionContext);\n                    }\n                    return restarted;\n                });\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.clearAllOutputs, {\n        label: trans.__('Clear All Outputs'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.clearAllOutputs(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.clearOutputs, {\n        label: trans.__('Clear Outputs'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.clearOutputs(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.interrupt, {\n        label: trans.__('Interrupt Kernel'),\n        execute: args => {\n            var _a;\n            const current = getCurrent(tracker, shell, args);\n            if (!current) {\n                return;\n            }\n            const kernel = (_a = current.context.sessionContext.session) === null || _a === void 0 ? void 0 : _a.kernel;\n            if (kernel) {\n                return kernel.interrupt();\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.toCode, {\n        label: trans.__('Change to Code Cell Type'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.changeCellType(current.content, 'code');\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.toMarkdown, {\n        label: trans.__('Change to Markdown Cell Type'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.changeCellType(current.content, 'markdown');\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.toRaw, {\n        label: trans.__('Change to Raw Cell Type'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.changeCellType(current.content, 'raw');\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.cut, {\n        label: trans.__('Cut Cells'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.cut(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.copy, {\n        label: trans.__('Copy Cells'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.copy(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.pasteBelow, {\n        label: trans.__('Paste Cells Below'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.paste(current.content, 'below');\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.pasteAbove, {\n        label: trans.__('Paste Cells Above'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.paste(current.content, 'above');\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.pasteAndReplace, {\n        label: trans.__('Paste Cells and Replace'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.paste(current.content, 'replace');\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.deleteCell, {\n        label: trans.__('Delete Cells'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.deleteCells(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.split, {\n        label: trans.__('Split Cell'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.splitCell(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.merge, {\n        label: trans.__('Merge Selected Cells'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.mergeCells(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.mergeAbove, {\n        label: trans.__('Merge Cell Above'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.mergeCells(current.content, true);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.mergeBelow, {\n        label: trans.__('Merge Cell Below'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.mergeCells(current.content, false);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.insertAbove, {\n        label: trans.__('Insert Cell Above'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.insertAbove(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.insertBelow, {\n        label: trans.__('Insert Cell Below'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.insertBelow(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.selectAbove, {\n        label: trans.__('Select Cell Above'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.selectAbove(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.selectBelow, {\n        label: trans.__('Select Cell Below'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.selectBelow(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.extendAbove, {\n        label: trans.__('Extend Selection Above'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.extendSelectionAbove(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.extendTop, {\n        label: trans.__('Extend Selection to Top'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.extendSelectionAbove(current.content, true);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.extendBelow, {\n        label: trans.__('Extend Selection Below'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.extendSelectionBelow(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.extendBottom, {\n        label: trans.__('Extend Selection to Bottom'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.extendSelectionBelow(current.content, true);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.selectAll, {\n        label: trans.__('Select All Cells'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.selectAll(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.deselectAll, {\n        label: trans.__('Deselect All Cells'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.deselectAll(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.moveUp, {\n        label: trans.__('Move Cells Up'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.moveUp(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.moveDown, {\n        label: trans.__('Move Cells Down'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.moveDown(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.toggleAllLines, {\n        label: trans.__('Toggle All Line Numbers'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.toggleAllLineNumbers(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.commandMode, {\n        label: trans.__('Enter Command Mode'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                current.content.mode = 'command';\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.editMode, {\n        label: trans.__('Enter Edit Mode'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                current.content.mode = 'edit';\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.undoCellAction, {\n        label: trans.__('Undo Cell Operation'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.undo(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.redoCellAction, {\n        label: trans.__('Redo Cell Operation'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.redo(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.changeKernel, {\n        label: trans.__('Change Kernel…'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return sessionDialogs.selectKernel(current.context.sessionContext, translator);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.reconnectToKernel, {\n        label: trans.__('Reconnect To Kernel'),\n        execute: args => {\n            var _a;\n            const current = getCurrent(tracker, shell, args);\n            if (!current) {\n                return;\n            }\n            const kernel = (_a = current.context.sessionContext.session) === null || _a === void 0 ? void 0 : _a.kernel;\n            if (kernel) {\n                return kernel.reconnect();\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.markdown1, {\n        label: trans.__('Change to Heading 1'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.setMarkdownHeader(current.content, 1);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.markdown2, {\n        label: trans.__('Change to Heading 2'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.setMarkdownHeader(current.content, 2);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.markdown3, {\n        label: trans.__('Change to Heading 3'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.setMarkdownHeader(current.content, 3);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.markdown4, {\n        label: trans.__('Change to Heading 4'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.setMarkdownHeader(current.content, 4);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.markdown5, {\n        label: trans.__('Change to Heading 5'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.setMarkdownHeader(current.content, 5);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.markdown6, {\n        label: trans.__('Change to Heading 6'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.setMarkdownHeader(current.content, 6);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.hideCode, {\n        label: trans.__('Collapse Selected Code'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.hideCode(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.showCode, {\n        label: trans.__('Expand Selected Code'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.showCode(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.hideAllCode, {\n        label: trans.__('Collapse All Code'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.hideAllCode(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.showAllCode, {\n        label: trans.__('Expand All Code'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.showAllCode(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.hideOutput, {\n        label: trans.__('Collapse Selected Outputs'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.hideOutput(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.showOutput, {\n        label: trans.__('Expand Selected Outputs'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.showOutput(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.hideAllOutputs, {\n        label: trans.__('Collapse All Outputs'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.hideAllOutputs(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.showAllOutputs, {\n        label: trans.__('Expand All Outputs'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.showAllOutputs(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.enableOutputScrolling, {\n        label: trans.__('Enable Scrolling for Outputs'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.enableOutputScrolling(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.disableOutputScrolling, {\n        label: trans.__('Disable Scrolling for Outputs'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.disableOutputScrolling(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.selectLastRunCell, {\n        label: trans.__('Select current running or last run cell'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.selectLastRunCell(current.content);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.replaceSelection, {\n        label: trans.__('Replace Selection in Notebook Cell'),\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            const text = args['text'] || '';\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.replaceSelection(current.content, text);\n            }\n        },\n        isEnabled\n    });\n    commands.addCommand(CommandIDs.toggleCollapseCmd, {\n        label: 'Toggle Collapse Notebook Heading',\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.toggleCurrentHeadingCollapse(current.content);\n            }\n        },\n        isEnabled: isEnabledAndHeadingSelected\n    });\n    commands.addCommand(CommandIDs.collapseAllCmd, {\n        label: 'Collapse All Cells',\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.collapseAll(current.content);\n            }\n        }\n    });\n    commands.addCommand(CommandIDs.expandAllCmd, {\n        label: 'Expand All Headings',\n        execute: args => {\n            const current = getCurrent(tracker, shell, args);\n            if (current) {\n                return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.expandAllHeadings(current.content);\n            }\n        }\n    });\n}\n/**\n * Populate the application's command palette with notebook commands.\n */\nfunction populatePalette(palette, translator) {\n    const trans = translator.load('jupyterlab');\n    let category = trans.__('Notebook Operations');\n    [\n        CommandIDs.interrupt,\n        CommandIDs.restart,\n        CommandIDs.restartClear,\n        CommandIDs.restartRunAll,\n        CommandIDs.runAll,\n        CommandIDs.renderAllMarkdown,\n        CommandIDs.runAllAbove,\n        CommandIDs.runAllBelow,\n        CommandIDs.restartAndRunToSelected,\n        CommandIDs.selectAll,\n        CommandIDs.deselectAll,\n        CommandIDs.clearAllOutputs,\n        CommandIDs.toggleAllLines,\n        CommandIDs.editMode,\n        CommandIDs.commandMode,\n        CommandIDs.changeKernel,\n        CommandIDs.reconnectToKernel,\n        CommandIDs.createConsole,\n        CommandIDs.closeAndShutdown,\n        CommandIDs.trust,\n        CommandIDs.toggleCollapseCmd,\n        CommandIDs.collapseAllCmd,\n        CommandIDs.expandAllCmd\n    ].forEach(command => {\n        palette.addItem({ command, category });\n    });\n    palette.addItem({\n        command: CommandIDs.createNew,\n        category,\n        args: { isPalette: true }\n    });\n    category = trans.__('Notebook Cell Operations');\n    [\n        CommandIDs.run,\n        CommandIDs.runAndAdvance,\n        CommandIDs.runAndInsert,\n        CommandIDs.runInConsole,\n        CommandIDs.clearOutputs,\n        CommandIDs.toCode,\n        CommandIDs.toMarkdown,\n        CommandIDs.toRaw,\n        CommandIDs.cut,\n        CommandIDs.copy,\n        CommandIDs.pasteBelow,\n        CommandIDs.pasteAbove,\n        CommandIDs.pasteAndReplace,\n        CommandIDs.deleteCell,\n        CommandIDs.split,\n        CommandIDs.merge,\n        CommandIDs.mergeAbove,\n        CommandIDs.mergeBelow,\n        CommandIDs.insertAbove,\n        CommandIDs.insertBelow,\n        CommandIDs.selectAbove,\n        CommandIDs.selectBelow,\n        CommandIDs.extendAbove,\n        CommandIDs.extendTop,\n        CommandIDs.extendBelow,\n        CommandIDs.extendBottom,\n        CommandIDs.moveDown,\n        CommandIDs.moveUp,\n        CommandIDs.undoCellAction,\n        CommandIDs.redoCellAction,\n        CommandIDs.markdown1,\n        CommandIDs.markdown2,\n        CommandIDs.markdown3,\n        CommandIDs.markdown4,\n        CommandIDs.markdown5,\n        CommandIDs.markdown6,\n        CommandIDs.hideCode,\n        CommandIDs.showCode,\n        CommandIDs.hideAllCode,\n        CommandIDs.showAllCode,\n        CommandIDs.hideOutput,\n        CommandIDs.showOutput,\n        CommandIDs.hideAllOutputs,\n        CommandIDs.showAllOutputs,\n        CommandIDs.enableOutputScrolling,\n        CommandIDs.disableOutputScrolling\n    ].forEach(command => {\n        palette.addItem({ command, category });\n    });\n}\n/**\n * Populates the application menus for the notebook.\n */\nfunction populateMenus(app, mainMenu, tracker, translator, sessionDialogs) {\n    const trans = translator.load('jupyterlab');\n    const { commands } = app;\n    sessionDialogs = sessionDialogs || _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.sessionContextDialogs;\n    // Add undo/redo hooks to the edit menu.\n    mainMenu.editMenu.undoers.add({\n        tracker,\n        undo: widget => {\n            var _a;\n            (_a = widget.content.activeCell) === null || _a === void 0 ? void 0 : _a.editor.undo();\n        },\n        redo: widget => {\n            var _a;\n            (_a = widget.content.activeCell) === null || _a === void 0 ? void 0 : _a.editor.redo();\n        }\n    });\n    // Add a clearer to the edit menu\n    mainMenu.editMenu.clearers.add({\n        tracker,\n        clearCurrentLabel: (n) => trans.__('Clear Output'),\n        clearAllLabel: (n) => {\n            return trans.__('Clear All Outputs');\n        },\n        clearCurrent: (current) => {\n            return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.clearOutputs(current.content);\n        },\n        clearAll: (current) => {\n            return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.clearAllOutputs(current.content);\n        }\n    });\n    // Add a close and shutdown command to the file menu.\n    mainMenu.fileMenu.closeAndCleaners.add({\n        tracker,\n        closeAndCleanupLabel: (n) => trans.__('Close and Shutdown Notebook'),\n        closeAndCleanup: (current) => {\n            const fileName = current.title.label;\n            return (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.showDialog)({\n                title: trans.__('Shut down the Notebook?'),\n                body: trans.__('Are you sure you want to close \"%1\"?', fileName),\n                buttons: [_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Dialog.cancelButton(), _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Dialog.warnButton()]\n            }).then(result => {\n                if (result.button.accept) {\n                    return current.context.sessionContext.shutdown().then(() => {\n                        current.dispose();\n                    });\n                }\n            });\n        }\n    });\n    // Add a kernel user to the Kernel menu\n    mainMenu.kernelMenu.kernelUsers.add({\n        tracker,\n        interruptKernel: current => {\n            var _a;\n            const kernel = (_a = current.sessionContext.session) === null || _a === void 0 ? void 0 : _a.kernel;\n            if (kernel) {\n                return kernel.interrupt();\n            }\n            return Promise.resolve(void 0);\n        },\n        reconnectToKernel: current => {\n            var _a;\n            const kernel = (_a = current.sessionContext.session) === null || _a === void 0 ? void 0 : _a.kernel;\n            if (kernel) {\n                return kernel.reconnect();\n            }\n            return Promise.resolve(void 0);\n        },\n        restartKernelAndClearLabel: (n) => trans.__('Restart Kernel and Clear All Outputs…'),\n        restartKernel: current => sessionDialogs.restart(current.sessionContext, translator),\n        restartKernelAndClear: current => {\n            return sessionDialogs\n                .restart(current.sessionContext, translator)\n                .then(restarted => {\n                if (restarted) {\n                    _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.clearAllOutputs(current.content);\n                }\n                return restarted;\n            });\n        },\n        changeKernel: current => sessionDialogs.selectKernel(current.sessionContext, translator),\n        shutdownKernel: current => current.sessionContext.shutdown()\n    });\n    // Add a console creator the the Kernel menu\n    mainMenu.fileMenu.consoleCreators.add({\n        tracker,\n        createConsoleLabel: (n) => trans.__('New Console for Notebook'),\n        createConsole: current => Private.createConsole(commands, current, true)\n    });\n    // Add an IEditorViewer to the application view menu\n    mainMenu.viewMenu.editorViewers.add({\n        tracker,\n        toggleLineNumbers: widget => {\n            _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.toggleAllLineNumbers(widget.content);\n        },\n        lineNumbersToggled: widget => {\n            const config = widget.content.editorConfig;\n            return !!(config.code.lineNumbers &&\n                config.markdown.lineNumbers &&\n                config.raw.lineNumbers);\n        }\n    });\n    // Add an ICodeRunner to the application run menu\n    mainMenu.runMenu.codeRunners.add({\n        tracker,\n        runLabel: (n) => trans.__('Run Selected Cells'),\n        runAllLabel: (n) => trans.__('Run All Cells'),\n        restartAndRunAllLabel: (n) => trans.__('Restart Kernel and Run All Cells…'),\n        run: current => {\n            const { context, content } = current;\n            return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.runAndAdvance(content, context.sessionContext).then(() => void 0);\n        },\n        runAll: current => {\n            const { context, content } = current;\n            return _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.runAll(content, context.sessionContext).then(() => void 0);\n        },\n        restartAndRunAll: current => {\n            const { context, content } = current;\n            return sessionDialogs\n                .restart(context.sessionContext, translator)\n                .then(restarted => {\n                if (restarted) {\n                    void _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_9__.NotebookActions.runAll(content, context.sessionContext);\n                }\n                return restarted;\n            });\n        }\n    });\n    // Add kernel information to the application help menu.\n    mainMenu.helpMenu.kernelUsers.add({\n        tracker,\n        getKernel: current => { var _a; return (_a = current.sessionContext.session) === null || _a === void 0 ? void 0 : _a.kernel; }\n    });\n}\n/**\n * A namespace for module private functionality.\n */\nvar Private;\n(function (Private) {\n    /**\n     * Create a console connected with a notebook kernel\n     *\n     * @param commands Commands registry\n     * @param widget Notebook panel\n     * @param activate Should the console be activated\n     */\n    function createConsole(commands, widget, activate) {\n        const options = {\n            path: widget.context.path,\n            preferredLanguage: widget.context.model.defaultKernelLanguage,\n            activate: activate,\n            ref: widget.id,\n            insertMode: 'split-bottom'\n        };\n        return commands.execute('console:create', options);\n    }\n    Private.createConsole = createConsole;\n    /**\n     * Whether there is an active notebook.\n     */\n    function isEnabled(shell, tracker) {\n        return (tracker.currentWidget !== null &&\n            tracker.currentWidget === shell.currentWidget);\n    }\n    Private.isEnabled = isEnabled;\n    /**\n     * Whether there is an notebook active, with a single selected cell.\n     */\n    function isEnabledAndSingleSelected(shell, tracker) {\n        if (!Private.isEnabled(shell, tracker)) {\n            return false;\n        }\n        const { content } = tracker.currentWidget;\n        const index = content.activeCellIndex;\n        // If there are selections that are not the active cell,\n        // this command is confusing, so disable it.\n        for (let i = 0; i < content.widgets.length; ++i) {\n            if (content.isSelected(content.widgets[i]) && i !== index) {\n                return false;\n            }\n        }\n        return true;\n    }\n    Private.isEnabledAndSingleSelected = isEnabledAndSingleSelected;\n    /**\n     * Whether there is an notebook active, with a single selected cell.\n     */\n    function isEnabledAndHeadingSelected(shell, tracker) {\n        if (!Private.isEnabled(shell, tracker)) {\n            return false;\n        }\n        const { content } = tracker.currentWidget;\n        const index = content.activeCellIndex;\n        if (!(content.activeCell instanceof _jupyterlab_cells__WEBPACK_IMPORTED_MODULE_2__.MarkdownCell)) {\n            return false;\n        }\n        // If there are selections that are not the active cell,\n        // this command is confusing, so disable it.\n        for (let i = 0; i < content.widgets.length; ++i) {\n            if (content.isSelected(content.widgets[i]) && i !== index) {\n                return false;\n            }\n        }\n        return true;\n    }\n    Private.isEnabledAndHeadingSelected = isEnabledAndHeadingSelected;\n    /**\n     * The default Export To ... formats and their human readable labels.\n     */\n    function getFormatLabels(translator) {\n        translator = translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_15__.nullTranslator;\n        const trans = translator.load('jupyterlab');\n        return {\n            html: trans.__('HTML'),\n            latex: trans.__('LaTeX'),\n            markdown: trans.__('Markdown'),\n            pdf: trans.__('PDF'),\n            rst: trans.__('ReStructured Text'),\n            script: trans.__('Executable Script'),\n            slides: trans.__('Reveal.js Slides')\n        };\n    }\n    Private.getFormatLabels = getFormatLabels;\n    /**\n     * A widget hosting a cloned output area.\n     */\n    class ClonedOutputArea extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_21__.Panel {\n        constructor(options) {\n            super();\n            this._cell = null;\n            const trans = (options.translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_15__.nullTranslator).load('jupyterlab');\n            this._notebook = options.notebook;\n            this._index = options.index !== undefined ? options.index : -1;\n            this._cell = options.cell || null;\n            this.id = `LinkedOutputView-${_lumino_coreutils__WEBPACK_IMPORTED_MODULE_18__.UUID.uuid4()}`;\n            this.title.label = 'Output View';\n            this.title.icon = _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_16__.notebookIcon;\n            this.title.caption = this._notebook.title.label\n                ? trans.__('For Notebook: %1', this._notebook.title.label)\n                : trans.__('For Notebook:');\n            this.addClass('jp-LinkedOutputView');\n            // Wait for the notebook to be loaded before\n            // cloning the output area.\n            void this._notebook.context.ready.then(() => {\n                if (!this._cell) {\n                    this._cell = this._notebook.content.widgets[this._index];\n                }\n                if (!this._cell || this._cell.model.type !== 'code') {\n                    this.dispose();\n                    return;\n                }\n                const clone = this._cell.cloneOutputArea();\n                this.addWidget(clone);\n            });\n        }\n        /**\n         * The index of the cell in the notebook.\n         */\n        get index() {\n            return this._cell\n                ? _lumino_algorithm__WEBPACK_IMPORTED_MODULE_17__.ArrayExt.findFirstIndex(this._notebook.content.widgets, c => c === this._cell)\n                : this._index;\n        }\n        /**\n         * The path of the notebook for the cloned output area.\n         */\n        get path() {\n            return this._notebook.context.path;\n        }\n    }\n    Private.ClonedOutputArea = ClonedOutputArea;\n})(Private || (Private = {}));\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/notebook-extension/lib/index.js?");

/***/ }),

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

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"logNotebookOutput\": () => (/* binding */ logNotebookOutput)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_logconsole__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/logconsole */ \"webpack/sharing/consume/default/@jupyterlab/logconsole/@jupyterlab/logconsole\");\n/* harmony import */ var _jupyterlab_logconsole__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_logconsole__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/notebook */ \"webpack/sharing/consume/default/@jupyterlab/notebook/@jupyterlab/notebook\");\n/* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jupyterlab_services__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyterlab/services */ \"webpack/sharing/consume/default/@jupyterlab/services/@jupyterlab/services\");\n/* harmony import */ var _jupyterlab_services__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_services__WEBPACK_IMPORTED_MODULE_2__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n\n/**\n * The Log Console extension.\n */\nconst logNotebookOutput = {\n    activate: activateNBOutput,\n    id: '@jupyterlab/notebook-extension:log-output',\n    requires: [_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_1__.INotebookTracker],\n    optional: [_jupyterlab_logconsole__WEBPACK_IMPORTED_MODULE_0__.ILoggerRegistry],\n    autoStart: true\n};\nfunction activateNBOutput(app, nbtracker, loggerRegistry) {\n    if (!loggerRegistry) {\n        // Automatically disable if logconsole is missing\n        return;\n    }\n    function registerNB(nb) {\n        function logOutput(msg, levelNormal, levelError) {\n            if (_jupyterlab_services__WEBPACK_IMPORTED_MODULE_2__.KernelMessage.isDisplayDataMsg(msg) ||\n                _jupyterlab_services__WEBPACK_IMPORTED_MODULE_2__.KernelMessage.isStreamMsg(msg) ||\n                _jupyterlab_services__WEBPACK_IMPORTED_MODULE_2__.KernelMessage.isErrorMsg(msg) ||\n                _jupyterlab_services__WEBPACK_IMPORTED_MODULE_2__.KernelMessage.isExecuteResultMsg(msg)) {\n                const logger = loggerRegistry.getLogger(nb.context.path);\n                logger.rendermime = nb.content.rendermime;\n                const data = Object.assign(Object.assign({}, msg.content), { output_type: msg.header.msg_type });\n                let level = levelNormal;\n                if (_jupyterlab_services__WEBPACK_IMPORTED_MODULE_2__.KernelMessage.isErrorMsg(msg) ||\n                    (_jupyterlab_services__WEBPACK_IMPORTED_MODULE_2__.KernelMessage.isStreamMsg(msg) && msg.content.name === 'stderr')) {\n                    level = levelError;\n                }\n                logger.log({ type: 'output', data, level });\n            }\n        }\n        // There is overlap here since unhandled messages are also emitted in the\n        // iopubMessage signal. However, unhandled messages warrant a higher log\n        // severity, so we'll accept that they are logged twice.\n        nb.context.sessionContext.iopubMessage.connect((_, msg) => logOutput(msg, 'info', 'info'));\n        nb.context.sessionContext.unhandledMessage.connect((_, msg) => logOutput(msg, 'warning', 'error'));\n    }\n    nbtracker.forEach(nb => registerNB(nb));\n    nbtracker.widgetAdded.connect((_, nb) => registerNB(nb));\n}\n//# sourceMappingURL=nboutput.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/notebook-extension/lib/nboutput.js?");

/***/ })

}]);