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

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

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   DEFAULT_CONTEXT_ITEM_RANK: () => (/* binding */ DEFAULT_CONTEXT_ITEM_RANK),\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_coreutils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyterlab/coreutils */ \"webpack/sharing/consume/default/@jupyterlab/coreutils/@jupyterlab/coreutils\");\n/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _jupyterlab_property_inspector__WEBPACK_IMPORTED_MODULE_3__ = __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_3___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_property_inspector__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @jupyterlab/settingregistry */ \"webpack/sharing/consume/default/@jupyterlab/settingregistry/@jupyterlab/settingregistry\");\n/* harmony import */ var _jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _jupyterlab_statedb__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @jupyterlab/statedb */ \"webpack/sharing/consume/default/@jupyterlab/statedb/@jupyterlab/statedb\");\n/* harmony import */ var _jupyterlab_statedb__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_statedb__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _jupyterlab_statusbar__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @jupyterlab/statusbar */ \"webpack/sharing/consume/default/@jupyterlab/statusbar/@jupyterlab/statusbar\");\n/* harmony import */ var _jupyterlab_statusbar__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_statusbar__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @jupyterlab/translation */ \"webpack/sharing/consume/default/@jupyterlab/translation/@jupyterlab/translation\");\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_translation__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_8__ = __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_8___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @lumino/algorithm */ \"webpack/sharing/consume/default/@lumino/algorithm/@lumino/algorithm\");\n/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_lumino_algorithm__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @lumino/coreutils */ \"webpack/sharing/consume/default/@lumino/coreutils/@lumino/coreutils\");\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _lumino_commands__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @lumino/commands */ \"webpack/sharing/consume/default/@lumino/commands/@lumino/commands\");\n/* harmony import */ var _lumino_commands__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_lumino_commands__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _lumino_disposable__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @lumino/disposable */ \"webpack/sharing/consume/default/@lumino/disposable/@lumino/disposable\");\n/* harmony import */ var _lumino_disposable__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_lumino_disposable__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @lumino/widgets */ \"webpack/sharing/consume/default/@lumino/widgets/@lumino/widgets\");\n/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_lumino_widgets__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! react */ \"webpack/sharing/consume/default/react/react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _topbar__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./topbar */ \"../node_modules/@jupyterlab/application-extension/lib/topbar.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/**\n * @packageDocumentation\n * @module application-extension\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Default context menu item rank\n */\nconst DEFAULT_CONTEXT_ITEM_RANK = 100;\n/**\n * The command IDs used by the application plugin.\n */\nvar CommandIDs;\n(function (CommandIDs) {\n    CommandIDs.activateNextTab = 'application:activate-next-tab';\n    CommandIDs.activatePreviousTab = 'application:activate-previous-tab';\n    CommandIDs.activateNextTabBar = 'application:activate-next-tab-bar';\n    CommandIDs.activatePreviousTabBar = 'application:activate-previous-tab-bar';\n    CommandIDs.close = 'application:close';\n    CommandIDs.closeOtherTabs = 'application:close-other-tabs';\n    CommandIDs.closeRightTabs = 'application:close-right-tabs';\n    CommandIDs.closeAll = 'application:close-all';\n    CommandIDs.setMode = 'application:set-mode';\n    CommandIDs.showPropertyPanel = 'property-inspector:show-panel';\n    CommandIDs.resetLayout = 'application:reset-layout';\n    CommandIDs.toggleHeader = 'application:toggle-header';\n    CommandIDs.toggleMode = 'application:toggle-mode';\n    CommandIDs.toggleLeftArea = 'application:toggle-left-area';\n    CommandIDs.toggleRightArea = 'application:toggle-right-area';\n    CommandIDs.toggleSideTabBar = 'application:toggle-side-tabbar';\n    CommandIDs.toggleSidebarWidget = 'application:toggle-sidebar-widget';\n    CommandIDs.togglePresentationMode = 'application:toggle-presentation-mode';\n    CommandIDs.tree = 'router:tree';\n    CommandIDs.switchSidebar = 'sidebar:switch';\n})(CommandIDs || (CommandIDs = {}));\n/**\n * A plugin to register the commands for the main application.\n */\nconst mainCommands = {\n    id: '@jupyterlab/application-extension:commands',\n    description: 'Adds commands related to the shell.',\n    autoStart: true,\n    requires: [_jupyterlab_translation__WEBPACK_IMPORTED_MODULE_7__.ITranslator],\n    optional: [_jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.ILabShell, _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ICommandPalette],\n    activate: (app, translator, labShell, palette) => {\n        var _a;\n        const { commands, shell } = app;\n        const trans = translator.load('jupyterlab');\n        const category = trans.__('Main Area');\n        // Add Command to override the JLab context menu.\n        commands.addCommand(_jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.JupyterFrontEndContextMenu.contextMenu, {\n            label: trans.__('Shift+Right Click for Browser Menu'),\n            isEnabled: () => false,\n            execute: () => void 0\n        });\n        // Returns the widget associated with the most recent contextmenu event.\n        const contextMenuWidget = () => {\n            const test = (node) => !!node.dataset.id;\n            const node = app.contextMenuHitTest(test);\n            if (!node) {\n                // Fall back to active widget if path cannot be obtained from event.\n                return shell.currentWidget;\n            }\n            return ((0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_9__.find)(shell.widgets('main'), widget => widget.id === node.dataset.id) ||\n                shell.currentWidget);\n        };\n        // Closes an array of widgets.\n        const closeWidgets = (widgets) => {\n            widgets.forEach(widget => widget.close());\n        };\n        // Find the tab area for a widget within a specific dock area.\n        const findTab = (area, widget) => {\n            if (area.type === 'tab-area') {\n                return area.widgets.includes(widget) ? area : null;\n            }\n            if (area.type === 'split-area') {\n                for (const child of area.children) {\n                    const found = findTab(child, widget);\n                    if (found) {\n                        return found;\n                    }\n                }\n            }\n            return null;\n        };\n        // Find the tab area for a widget within the main dock area.\n        const tabAreaFor = (widget) => {\n            var _a;\n            const layout = labShell === null || labShell === void 0 ? void 0 : labShell.saveLayout();\n            const mainArea = layout === null || layout === void 0 ? void 0 : layout.mainArea;\n            if (!mainArea || _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__.PageConfig.getOption('mode') !== 'multiple-document') {\n                return null;\n            }\n            const area = (_a = mainArea.dock) === null || _a === void 0 ? void 0 : _a.main;\n            return area ? findTab(area, widget) : null;\n        };\n        // Returns an array of all widgets to the right of a widget in a tab area.\n        const widgetsRightOf = (widget) => {\n            const { id } = widget;\n            const tabArea = tabAreaFor(widget);\n            const widgets = tabArea ? tabArea.widgets || [] : [];\n            const index = widgets.findIndex(widget => widget.id === id);\n            if (index < 0) {\n                return [];\n            }\n            return widgets.slice(index + 1);\n        };\n        // Gets and returns the dataId of currently active tab in the specified sidebar (left or right)\n        // or an empty string\n        const activeSidePanelWidget = (side) => {\n            // default active element is luancher (luancher-0)\n            let activeTab;\n            if (side != 'left' && side != 'right') {\n                throw Error(`Unsupported sidebar: ${side}`);\n            }\n            if (side === 'left') {\n                activeTab = document.querySelector('.lm-TabBar-tab.lm-mod-current');\n            }\n            else {\n                const query = document.querySelectorAll('.lm-TabBar-tab.lm-mod-current');\n                activeTab = query[query.length - 1];\n            }\n            const activeTabDataId = activeTab === null || activeTab === void 0 ? void 0 : activeTab.getAttribute('data-id');\n            if (activeTabDataId) {\n                return activeTabDataId === null || activeTabDataId === void 0 ? void 0 : activeTabDataId.toString();\n            }\n            else {\n                return '';\n            }\n        };\n        // Sets tab focus on the element\n        function setTabFocus(focusElement) {\n            if (focusElement) {\n                focusElement.focus();\n            }\n        }\n        commands.addCommand(CommandIDs.close, {\n            label: () => trans.__('Close Tab'),\n            isEnabled: () => {\n                const widget = contextMenuWidget();\n                return !!widget && widget.title.closable;\n            },\n            execute: () => {\n                const widget = contextMenuWidget();\n                if (widget) {\n                    widget.close();\n                }\n            }\n        });\n        commands.addCommand(CommandIDs.closeOtherTabs, {\n            label: () => trans.__('Close All Other Tabs'),\n            isEnabled: () => {\n                // Ensure there are at least two widgets.\n                return (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_9__.some)(shell.widgets('main'), (_, i) => i === 1);\n            },\n            execute: () => {\n                const widget = contextMenuWidget();\n                if (!widget) {\n                    return;\n                }\n                const { id } = widget;\n                for (const widget of shell.widgets('main')) {\n                    if (widget.id !== id) {\n                        widget.close();\n                    }\n                }\n            }\n        });\n        commands.addCommand(CommandIDs.closeRightTabs, {\n            label: () => trans.__('Close Tabs to Right'),\n            isEnabled: () => !!contextMenuWidget() &&\n                widgetsRightOf(contextMenuWidget()).length > 0,\n            execute: () => {\n                const widget = contextMenuWidget();\n                if (!widget) {\n                    return;\n                }\n                closeWidgets(widgetsRightOf(widget));\n            }\n        });\n        (_a = shell.currentChanged) === null || _a === void 0 ? void 0 : _a.connect(() => {\n            [\n                CommandIDs.close,\n                CommandIDs.closeOtherTabs,\n                CommandIDs.closeRightTabs\n            ].forEach(cmd => commands.notifyCommandChanged(cmd));\n        });\n        if (labShell) {\n            commands.addCommand(CommandIDs.activateNextTab, {\n                label: trans.__('Activate Next Tab'),\n                execute: () => {\n                    labShell.activateNextTab();\n                }\n            });\n            commands.addCommand(CommandIDs.activatePreviousTab, {\n                label: trans.__('Activate Previous Tab'),\n                execute: () => {\n                    labShell.activatePreviousTab();\n                }\n            });\n            commands.addCommand(CommandIDs.activateNextTabBar, {\n                label: trans.__('Activate Next Tab Bar'),\n                execute: () => {\n                    labShell.activateNextTabBar();\n                }\n            });\n            commands.addCommand(CommandIDs.activatePreviousTabBar, {\n                label: trans.__('Activate Previous Tab Bar'),\n                execute: () => {\n                    labShell.activatePreviousTabBar();\n                }\n            });\n            commands.addCommand(CommandIDs.closeAll, {\n                label: trans.__('Close All Tabs'),\n                execute: () => {\n                    labShell.closeAll();\n                }\n            });\n            commands.addCommand(CommandIDs.toggleHeader, {\n                label: trans.__('Show Header'),\n                execute: () => {\n                    if (labShell.mode === 'single-document') {\n                        labShell.toggleTopInSimpleModeVisibility();\n                    }\n                },\n                isToggled: () => labShell.isTopInSimpleModeVisible(),\n                isVisible: () => labShell.mode === 'single-document'\n            });\n            commands.addCommand(CommandIDs.toggleLeftArea, {\n                label: trans.__('Show Left Sidebar'),\n                execute: () => {\n                    if (labShell.leftCollapsed) {\n                        labShell.expandLeft();\n                    }\n                    else {\n                        labShell.collapseLeft();\n                        if (labShell.currentWidget) {\n                            labShell.activateById(labShell.currentWidget.id);\n                        }\n                    }\n                },\n                isToggled: () => !labShell.leftCollapsed,\n                isEnabled: () => !labShell.isEmpty('left')\n            });\n            commands.addCommand(CommandIDs.toggleRightArea, {\n                label: trans.__('Show Right Sidebar'),\n                execute: () => {\n                    if (labShell.rightCollapsed) {\n                        labShell.expandRight();\n                    }\n                    else {\n                        labShell.collapseRight();\n                        if (labShell.currentWidget) {\n                            labShell.activateById(labShell.currentWidget.id);\n                        }\n                    }\n                },\n                isToggled: () => !labShell.rightCollapsed,\n                isEnabled: () => !labShell.isEmpty('right')\n            });\n            commands.addCommand(CommandIDs.toggleSidebarWidget, {\n                label: args => args === undefined ||\n                    args.side === undefined ||\n                    args.index === undefined\n                    ? trans.__('Toggle Sidebar Element')\n                    : args.side === 'right'\n                        ? trans.__('Toggle Element %1 in Right Sidebar', parseInt(args.index, 10) + 1)\n                        : trans.__('Toggle Element %1 in Left Sidebar', parseInt(args.index, 10) + 1),\n                execute: args => {\n                    const index = parseInt(args.index, 10);\n                    if (args.side != 'left' && args.side != 'right') {\n                        throw Error(`Unsupported sidebar: ${args.side}`);\n                    }\n                    const widgets = Array.from(labShell.widgets(args.side));\n                    if (index >= widgets.length) {\n                        return;\n                    }\n                    const widgetId = widgets[index].id;\n                    const focusElement = document.querySelector(\"[data-id='\" + widgetId + \"']\");\n                    if (activeSidePanelWidget(args.side) === widgetId) {\n                        if (args.side == 'left') {\n                            labShell.collapseLeft();\n                            setTabFocus(focusElement);\n                        }\n                        if (args.side == 'right') {\n                            labShell.collapseRight();\n                            setTabFocus(focusElement);\n                        }\n                    }\n                    else {\n                        labShell.activateById(widgetId);\n                        setTabFocus(focusElement);\n                    }\n                }\n            });\n            commands.addCommand(CommandIDs.toggleSideTabBar, {\n                label: args => args.side === 'right'\n                    ? trans.__('Show Right Activity Bar')\n                    : trans.__('Show Left Activity Bar'),\n                execute: args => {\n                    if (args.side === 'right') {\n                        labShell.toggleSideTabBarVisibility('right');\n                    }\n                    else {\n                        labShell.toggleSideTabBarVisibility('left');\n                    }\n                },\n                isToggled: args => args.side === 'right'\n                    ? labShell.isSideTabBarVisible('right')\n                    : labShell.isSideTabBarVisible('left'),\n                isEnabled: args => args.side === 'right'\n                    ? !labShell.isEmpty('right')\n                    : !labShell.isEmpty('left')\n            });\n            commands.addCommand(CommandIDs.togglePresentationMode, {\n                label: () => trans.__('Presentation Mode'),\n                execute: () => {\n                    labShell.presentationMode = !labShell.presentationMode;\n                },\n                isToggled: () => labShell.presentationMode,\n                isVisible: () => true\n            });\n            commands.addCommand(CommandIDs.setMode, {\n                label: args => args['mode']\n                    ? trans.__('Set %1 mode.', args['mode'])\n                    : trans.__('Set the layout `mode`.'),\n                caption: trans.__('The layout `mode` can be \"single-document\" or \"multiple-document\".'),\n                isVisible: args => {\n                    const mode = args['mode'];\n                    return mode === 'single-document' || mode === 'multiple-document';\n                },\n                execute: args => {\n                    const mode = args['mode'];\n                    if (mode === 'single-document' || mode === 'multiple-document') {\n                        labShell.mode = mode;\n                        return;\n                    }\n                    throw new Error(`Unsupported application shell mode: ${mode}`);\n                }\n            });\n            commands.addCommand(CommandIDs.toggleMode, {\n                label: trans.__('Simple Interface'),\n                isToggled: () => labShell.mode === 'single-document',\n                execute: () => {\n                    const args = labShell.mode === 'multiple-document'\n                        ? { mode: 'single-document' }\n                        : { mode: 'multiple-document' };\n                    return commands.execute(CommandIDs.setMode, args);\n                }\n            });\n            commands.addCommand(CommandIDs.resetLayout, {\n                label: trans.__('Reset Default Layout'),\n                execute: () => {\n                    // Turn off presentation mode\n                    if (labShell.presentationMode) {\n                        commands\n                            .execute(CommandIDs.togglePresentationMode)\n                            .catch(reason => {\n                            console.error('Failed to undo presentation mode.', reason);\n                        });\n                    }\n                    // Display top header\n                    if (labShell.mode === 'single-document' &&\n                        !labShell.isTopInSimpleModeVisible()) {\n                        commands.execute(CommandIDs.toggleHeader).catch(reason => {\n                            console.error('Failed to display title header.', reason);\n                        });\n                    }\n                    // Display side tabbar\n                    ['left', 'right'].forEach(side => {\n                        if (!labShell.isSideTabBarVisible(side) &&\n                            !labShell.isEmpty(side)) {\n                            commands\n                                .execute(CommandIDs.toggleSideTabBar, { side })\n                                .catch(reason => {\n                                console.error(`Failed to show ${side} activity bar.`, reason);\n                            });\n                        }\n                    });\n                    // Some actions are also trigger indirectly\n                    // - by listening to this command execution.\n                }\n            });\n        }\n        if (palette) {\n            [\n                CommandIDs.activateNextTab,\n                CommandIDs.activatePreviousTab,\n                CommandIDs.activateNextTabBar,\n                CommandIDs.activatePreviousTabBar,\n                CommandIDs.close,\n                CommandIDs.closeAll,\n                CommandIDs.closeOtherTabs,\n                CommandIDs.closeRightTabs,\n                CommandIDs.toggleHeader,\n                CommandIDs.toggleLeftArea,\n                CommandIDs.toggleRightArea,\n                CommandIDs.togglePresentationMode,\n                CommandIDs.toggleMode,\n                CommandIDs.resetLayout\n            ].forEach(command => palette.addItem({ command, category }));\n            ['right', 'left'].forEach(side => {\n                palette.addItem({\n                    command: CommandIDs.toggleSideTabBar,\n                    category,\n                    args: { side }\n                });\n            });\n        }\n    }\n};\n/**\n * The main extension.\n */\nconst main = {\n    id: '@jupyterlab/application-extension:main',\n    description: 'Initializes the application and provides the URL tree path handler.',\n    requires: [\n        _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.IRouter,\n        _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.IWindowResolver,\n        _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_7__.ITranslator,\n        _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.JupyterFrontEnd.ITreeResolver\n    ],\n    optional: [_jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.IConnectionLost],\n    provides: _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.ITreePathUpdater,\n    activate: (app, router, resolver, translator, treeResolver, connectionLost) => {\n        const trans = translator.load('jupyterlab');\n        if (!(app instanceof _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.JupyterLab)) {\n            throw new Error(`${main.id} must be activated in JupyterLab.`);\n        }\n        // These two internal state variables are used to manage the two source\n        // of the tree part of the URL being updated: 1) path of the active document,\n        // 2) path of the default browser if the active main area widget isn't a document.\n        let _docTreePath = '';\n        let _defaultBrowserTreePath = '';\n        function updateTreePath(treePath) {\n            // Wait for tree resolver to finish before updating the path because it use the PageConfig['treePath']\n            void treeResolver.paths.then(() => {\n                _defaultBrowserTreePath = treePath;\n                if (!_docTreePath) {\n                    const url = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__.PageConfig.getUrl({ treePath });\n                    const path = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__.URLExt.parse(url).pathname;\n                    router.navigate(path, { skipRouting: true });\n                    // Persist the new tree path to PageConfig as it is used elsewhere at runtime.\n                    _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__.PageConfig.setOption('treePath', treePath);\n                }\n            });\n        }\n        // Requiring the window resolver guarantees that the application extension\n        // only loads if there is a viable window name. Otherwise, the application\n        // will short-circuit and ask the user to navigate away.\n        const workspace = resolver.name;\n        console.debug(`Starting application in workspace: \"${workspace}\"`);\n        // If there were errors registering plugins, tell the user.\n        if (app.registerPluginErrors.length !== 0) {\n            const body = (react__WEBPACK_IMPORTED_MODULE_14__.createElement(\"pre\", null, app.registerPluginErrors.map(e => e.message).join('\\n')));\n            void (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.showErrorMessage)(trans.__('Error Registering Plugins'), {\n                message: body\n            });\n        }\n        // Watch the mode and update the page URL to /lab or /doc to reflect the\n        // change.\n        app.shell.modeChanged.connect((_, args) => {\n            const url = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__.PageConfig.getUrl({ mode: args });\n            const path = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__.URLExt.parse(url).pathname;\n            router.navigate(path, { skipRouting: true });\n            // Persist this mode change to PageConfig as it is used elsewhere at runtime.\n            _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__.PageConfig.setOption('mode', args);\n        });\n        // Wait for tree resolver to finish before updating the path because it use the PageConfig['treePath']\n        void treeResolver.paths.then(() => {\n            // Watch the path of the current widget in the main area and update the page\n            // URL to reflect the change.\n            app.shell.currentPathChanged.connect((_, args) => {\n                const maybeTreePath = args.newValue;\n                const treePath = maybeTreePath || _defaultBrowserTreePath;\n                const url = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__.PageConfig.getUrl({ treePath: treePath });\n                const path = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__.URLExt.parse(url).pathname;\n                router.navigate(path, { skipRouting: true });\n                // Persist the new tree path to PageConfig as it is used elsewhere at runtime.\n                _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__.PageConfig.setOption('treePath', treePath);\n                _docTreePath = maybeTreePath;\n            });\n        });\n        // If the connection to the server is lost, handle it with the\n        // connection lost handler.\n        connectionLost = connectionLost || _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.ConnectionLost;\n        app.serviceManager.connectionFailure.connect((manager, error) => connectionLost(manager, error, translator));\n        const builder = app.serviceManager.builder;\n        const build = () => {\n            return builder\n                .build()\n                .then(() => {\n                return (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.showDialog)({\n                    title: trans.__('Build Complete'),\n                    body: (react__WEBPACK_IMPORTED_MODULE_14__.createElement(\"div\", null,\n                        trans.__('Build successfully completed, reload page?'),\n                        react__WEBPACK_IMPORTED_MODULE_14__.createElement(\"br\", null),\n                        trans.__('You will lose any unsaved changes.'))),\n                    buttons: [\n                        _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Dialog.cancelButton({\n                            label: trans.__('Reload Without Saving'),\n                            actions: ['reload']\n                        }),\n                        _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Dialog.okButton({ label: trans.__('Save and Reload') })\n                    ],\n                    hasClose: true\n                });\n            })\n                .then(({ button: { accept, actions } }) => {\n                if (accept) {\n                    void app.commands\n                        .execute('docmanager:save')\n                        .then(() => {\n                        router.reload();\n                    })\n                        .catch(err => {\n                        void (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.showErrorMessage)(trans.__('Save Failed'), {\n                            message: react__WEBPACK_IMPORTED_MODULE_14__.createElement(\"pre\", null, err.message)\n                        });\n                    });\n                }\n                else if (actions.includes('reload')) {\n                    router.reload();\n                }\n            })\n                .catch(err => {\n                void (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.showErrorMessage)(trans.__('Build Failed'), {\n                    message: react__WEBPACK_IMPORTED_MODULE_14__.createElement(\"pre\", null, err.message)\n                });\n            });\n        };\n        if (builder.isAvailable && builder.shouldCheck) {\n            void builder.getStatus().then(response => {\n                if (response.status === 'building') {\n                    return build();\n                }\n                if (response.status !== 'needed') {\n                    return;\n                }\n                const body = (react__WEBPACK_IMPORTED_MODULE_14__.createElement(\"div\", null,\n                    trans.__('JupyterLab build is suggested:'),\n                    react__WEBPACK_IMPORTED_MODULE_14__.createElement(\"br\", null),\n                    react__WEBPACK_IMPORTED_MODULE_14__.createElement(\"pre\", null, response.message)));\n                void (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.showDialog)({\n                    title: trans.__('Build Recommended'),\n                    body,\n                    buttons: [\n                        _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Dialog.cancelButton(),\n                        _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Dialog.okButton({ label: trans.__('Build') })\n                    ]\n                }).then(result => (result.button.accept ? build() : undefined));\n            });\n        }\n        return updateTreePath;\n    },\n    autoStart: true\n};\n/**\n * Plugin to build the context menu from the settings.\n */\nconst contextMenuPlugin = {\n    id: '@jupyterlab/application-extension:context-menu',\n    description: 'Populates the context menu.',\n    autoStart: true,\n    requires: [_jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_4__.ISettingRegistry, _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_7__.ITranslator],\n    activate: (app, settingRegistry, translator) => {\n        const trans = translator.load('jupyterlab');\n        function createMenu(options) {\n            const menu = new _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_8__.RankedMenu({ ...options, commands: app.commands });\n            if (options.label) {\n                menu.title.label = trans.__(options.label);\n            }\n            return menu;\n        }\n        // Load the context menu lately so plugins are loaded.\n        app.started\n            .then(() => {\n            return Private.loadSettingsContextMenu(app.contextMenu, settingRegistry, createMenu, translator);\n        })\n            .catch(reason => {\n            console.error('Failed to load context menu items from settings registry.', reason);\n        });\n    }\n};\n/**\n * Check if the application is dirty before closing the browser tab.\n */\nconst dirty = {\n    id: '@jupyterlab/application-extension:dirty',\n    description: 'Adds safeguard dialog when closing the browser tab with unsaved modifications.',\n    autoStart: true,\n    requires: [_jupyterlab_translation__WEBPACK_IMPORTED_MODULE_7__.ITranslator],\n    activate: (app, translator) => {\n        if (!(app instanceof _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.JupyterLab)) {\n            throw new Error(`${dirty.id} must be activated in JupyterLab.`);\n        }\n        const trans = translator.load('jupyterlab');\n        const message = trans.__('Are you sure you want to exit JupyterLab?\\n\\nAny unsaved changes will be lost.');\n        // The spec for the `beforeunload` event is implemented differently by\n        // the different browser vendors. Consequently, the `event.returnValue`\n        // attribute needs to set in addition to a return value being returned.\n        // For more information, see:\n        // https://developer.mozilla.org/en/docs/Web/Events/beforeunload\n        window.addEventListener('beforeunload', event => {\n            if (app.status.isDirty) {\n                return (event.returnValue = message);\n            }\n        });\n    }\n};\n/**\n * The default layout restorer provider.\n */\nconst layout = {\n    id: '@jupyterlab/application-extension:layout',\n    description: 'Provides the shell layout restorer.',\n    requires: [_jupyterlab_statedb__WEBPACK_IMPORTED_MODULE_5__.IStateDB, _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.ILabShell, _jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_4__.ISettingRegistry],\n    optional: [_jupyterlab_translation__WEBPACK_IMPORTED_MODULE_7__.ITranslator],\n    activate: (app, state, labShell, settingRegistry, translator) => {\n        const trans = (translator !== null && translator !== void 0 ? translator : _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_7__.nullTranslator).load('jupyterlab');\n        const first = app.started;\n        const registry = app.commands;\n        const mode = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__.PageConfig.getOption('mode');\n        const restorer = new _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.LayoutRestorer({\n            connector: state,\n            first,\n            registry,\n            mode\n        });\n        settingRegistry\n            .load(shell.id)\n            .then(settings => {\n            var _a, _b;\n            // Add a layer of customization to support app shell mode\n            const customizedLayout = settings.composite['layout'];\n            // Restore the layout.\n            void labShell\n                .restoreLayout(mode, restorer, {\n                'multiple-document': (_a = customizedLayout.multiple) !== null && _a !== void 0 ? _a : {},\n                'single-document': (_b = customizedLayout.single) !== null && _b !== void 0 ? _b : {}\n            })\n                .then(() => {\n                labShell.layoutModified.connect(() => {\n                    void restorer.save(labShell.saveLayout());\n                });\n                settings.changed.connect(onSettingsChanged);\n                Private.activateSidebarSwitcher(app, labShell, settings, trans);\n            });\n        })\n            .catch(reason => {\n            console.error('Fail to load settings for the layout restorer.');\n            console.error(reason);\n        });\n        return restorer;\n        async function onSettingsChanged(settings) {\n            if (!_lumino_coreutils__WEBPACK_IMPORTED_MODULE_10__.JSONExt.deepEqual(settings.composite['layout'], {\n                single: labShell.userLayout['single-document'],\n                multiple: labShell.userLayout['multiple-document']\n            })) {\n                const result = await (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.showDialog)({\n                    title: trans.__('Information'),\n                    body: trans.__('User layout customization has changed. You may need to reload JupyterLab to see the changes.'),\n                    buttons: [\n                        _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Dialog.cancelButton(),\n                        _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Dialog.okButton({ label: trans.__('Reload') })\n                    ]\n                });\n                if (result.button.accept) {\n                    location.reload();\n                }\n            }\n        }\n    },\n    autoStart: true,\n    provides: _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.ILayoutRestorer\n};\n/**\n * The default URL router provider.\n */\nconst router = {\n    id: '@jupyterlab/application-extension:router',\n    description: 'Provides the URL router',\n    requires: [_jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.JupyterFrontEnd.IPaths],\n    activate: (app, paths) => {\n        const { commands } = app;\n        const base = paths.urls.base;\n        const router = new _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.Router({ base, commands });\n        void app.started.then(() => {\n            // Route the very first request on load.\n            void router.route();\n            // Route all pop state events.\n            window.addEventListener('popstate', () => {\n                void router.route();\n            });\n        });\n        return router;\n    },\n    autoStart: true,\n    provides: _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.IRouter\n};\n/**\n * The default tree route resolver plugin.\n */\nconst tree = {\n    id: '@jupyterlab/application-extension:tree-resolver',\n    description: 'Provides the tree route resolver',\n    autoStart: true,\n    requires: [_jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.IRouter],\n    provides: _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.JupyterFrontEnd.ITreeResolver,\n    activate: (app, router) => {\n        const { commands } = app;\n        const set = new _lumino_disposable__WEBPACK_IMPORTED_MODULE_12__.DisposableSet();\n        const delegate = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_10__.PromiseDelegate();\n        const treePattern = new RegExp('/(lab|doc)(/workspaces/[a-zA-Z0-9-_]+)?(/tree/.*)?');\n        set.add(commands.addCommand(CommandIDs.tree, {\n            execute: async (args) => {\n                var _a;\n                if (set.isDisposed) {\n                    return;\n                }\n                const query = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__.URLExt.queryStringToObject((_a = args.search) !== null && _a !== void 0 ? _a : '');\n                const browser = query['file-browser-path'] || '';\n                // Remove the file browser path from the query string.\n                delete query['file-browser-path'];\n                // Clean up artifacts immediately upon routing.\n                set.dispose();\n                delegate.resolve({ browser, file: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__.PageConfig.getOption('treePath') });\n            }\n        }));\n        set.add(router.register({ command: CommandIDs.tree, pattern: treePattern }));\n        // If a route is handled by the router without the tree command being\n        // invoked, resolve to `null` and clean up artifacts.\n        const listener = () => {\n            if (set.isDisposed) {\n                return;\n            }\n            set.dispose();\n            delegate.resolve(null);\n        };\n        router.routed.connect(listener);\n        set.add(new _lumino_disposable__WEBPACK_IMPORTED_MODULE_12__.DisposableDelegate(() => {\n            router.routed.disconnect(listener);\n        }));\n        return { paths: delegate.promise };\n    }\n};\n/**\n * The default URL not found extension.\n */\nconst notfound = {\n    id: '@jupyterlab/application-extension:notfound',\n    description: 'Defines the behavior for not found URL (aka route).',\n    requires: [_jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.JupyterFrontEnd.IPaths, _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.IRouter, _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_7__.ITranslator],\n    activate: (_, paths, router, translator) => {\n        const trans = translator.load('jupyterlab');\n        const bad = paths.urls.notFound;\n        if (!bad) {\n            return;\n        }\n        const base = router.base;\n        const message = trans.__('The path: %1 was not found. JupyterLab redirected to: %2', bad, base);\n        // Change the URL back to the base application URL.\n        router.navigate('');\n        void (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.showErrorMessage)(trans.__('Path Not Found'), { message });\n    },\n    autoStart: true\n};\n/**\n * Change the favicon changing based on the busy status;\n */\nconst busy = {\n    id: '@jupyterlab/application-extension:faviconbusy',\n    description: 'Handles the favicon depending on the application status.',\n    requires: [_jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.ILabStatus],\n    activate: async (_, status) => {\n        status.busySignal.connect((_, isBusy) => {\n            const favicon = document.querySelector(`link[rel=\"icon\"]${isBusy ? '.idle.favicon' : '.busy.favicon'}`);\n            if (!favicon) {\n                return;\n            }\n            const newFavicon = document.querySelector(`link${isBusy ? '.busy.favicon' : '.idle.favicon'}`);\n            if (!newFavicon) {\n                return;\n            }\n            // If we have the two icons with the special classes, then toggle them.\n            if (favicon !== newFavicon) {\n                favicon.rel = '';\n                newFavicon.rel = 'icon';\n                // Firefox doesn't seem to recognize just changing rel, so we also\n                // reinsert the link into the DOM.\n                newFavicon.parentNode.replaceChild(newFavicon, newFavicon);\n            }\n        });\n    },\n    autoStart: true\n};\n/**\n * The default JupyterLab application shell.\n */\nconst shell = {\n    id: '@jupyterlab/application-extension:shell',\n    description: 'Provides the JupyterLab shell. It has an extended API compared to `app.shell`.',\n    optional: [_jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_4__.ISettingRegistry],\n    activate: (app, settingRegistry) => {\n        if (!(app.shell instanceof _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.LabShell)) {\n            throw new Error(`${shell.id} did not find a LabShell instance.`);\n        }\n        if (settingRegistry) {\n            void settingRegistry.load(shell.id).then(settings => {\n                app.shell.updateConfig(settings.composite);\n                settings.changed.connect(() => {\n                    app.shell.updateConfig(settings.composite);\n                });\n            });\n        }\n        return app.shell;\n    },\n    autoStart: true,\n    provides: _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.ILabShell\n};\n/**\n * The default JupyterLab application status provider.\n */\nconst status = {\n    id: '@jupyterlab/application-extension:status',\n    description: 'Provides the application status.',\n    activate: (app) => {\n        if (!(app instanceof _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.JupyterLab)) {\n            throw new Error(`${status.id} must be activated in JupyterLab.`);\n        }\n        return app.status;\n    },\n    autoStart: true,\n    provides: _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.ILabStatus\n};\n/**\n * The default JupyterLab application-specific information provider.\n *\n * #### Notes\n * This plugin should only be used by plugins that specifically need to access\n * JupyterLab application information, e.g., listing extensions that have been\n * loaded or deferred within JupyterLab.\n */\nconst info = {\n    id: '@jupyterlab/application-extension:info',\n    description: 'Provides the application information.',\n    activate: (app) => {\n        if (!(app instanceof _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.JupyterLab)) {\n            throw new Error(`${info.id} must be activated in JupyterLab.`);\n        }\n        return app.info;\n    },\n    autoStart: true,\n    provides: _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.JupyterLab.IInfo\n};\n/**\n * The default JupyterLab paths dictionary provider.\n */\nconst paths = {\n    id: '@jupyterlab/application-extension:paths',\n    description: 'Provides the application paths.',\n    activate: (app) => {\n        if (!(app instanceof _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.JupyterLab)) {\n            throw new Error(`${paths.id} must be activated in JupyterLab.`);\n        }\n        return app.paths;\n    },\n    autoStart: true,\n    provides: _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.JupyterFrontEnd.IPaths\n};\n/**\n * The default property inspector provider.\n */\nconst propertyInspector = {\n    id: '@jupyterlab/application-extension:property-inspector',\n    description: 'Provides the property inspector.',\n    autoStart: true,\n    requires: [_jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.ILabShell, _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_7__.ITranslator],\n    optional: [_jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.ILayoutRestorer],\n    provides: _jupyterlab_property_inspector__WEBPACK_IMPORTED_MODULE_3__.IPropertyInspectorProvider,\n    activate: (app, labshell, translator, restorer) => {\n        const trans = translator.load('jupyterlab');\n        const widget = new _jupyterlab_property_inspector__WEBPACK_IMPORTED_MODULE_3__.SideBarPropertyInspectorProvider({\n            shell: labshell,\n            translator\n        });\n        widget.title.icon = _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_8__.buildIcon;\n        widget.title.caption = trans.__('Property Inspector');\n        widget.id = 'jp-property-inspector';\n        labshell.add(widget, 'right', { rank: 100, type: 'Property Inspector' });\n        app.commands.addCommand(CommandIDs.showPropertyPanel, {\n            label: trans.__('Property Inspector'),\n            execute: () => {\n                labshell.activateById(widget.id);\n            }\n        });\n        if (restorer) {\n            restorer.add(widget, 'jp-property-inspector');\n        }\n        return widget;\n    }\n};\nconst jupyterLogo = {\n    id: '@jupyterlab/application-extension:logo',\n    description: 'Sets the application logo.',\n    autoStart: true,\n    requires: [_jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.ILabShell],\n    activate: (app, shell) => {\n        const logo = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_13__.Widget();\n        _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_8__.jupyterIcon.element({\n            container: logo.node,\n            elementPosition: 'center',\n            margin: '2px 2px 2px 8px',\n            height: 'auto',\n            width: '16px'\n        });\n        logo.id = 'jp-MainLogo';\n        shell.add(logo, 'top', { rank: 0 });\n    }\n};\n/**\n * The simple interface mode switch in the status bar.\n */\nconst modeSwitchPlugin = {\n    id: '@jupyterlab/application-extension:mode-switch',\n    description: 'Adds the interface mode switch',\n    requires: [_jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.ILabShell, _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_7__.ITranslator],\n    optional: [_jupyterlab_statusbar__WEBPACK_IMPORTED_MODULE_6__.IStatusBar, _jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_4__.ISettingRegistry],\n    activate: (app, labShell, translator, statusBar, settingRegistry) => {\n        if (statusBar === null) {\n            // Bail early\n            return;\n        }\n        const trans = translator.load('jupyterlab');\n        const modeSwitch = new _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_8__.Switch();\n        modeSwitch.id = 'jp-single-document-mode';\n        modeSwitch.valueChanged.connect((_, args) => {\n            labShell.mode = args.newValue ? 'single-document' : 'multiple-document';\n        });\n        labShell.modeChanged.connect((_, mode) => {\n            modeSwitch.value = mode === 'single-document';\n        });\n        if (settingRegistry) {\n            const loadSettings = settingRegistry.load(shell.id);\n            const updateSettings = (settings) => {\n                const startMode = settings.get('startMode').composite;\n                if (startMode) {\n                    labShell.mode =\n                        startMode === 'single' ? 'single-document' : 'multiple-document';\n                }\n            };\n            Promise.all([loadSettings, app.restored])\n                .then(([settings]) => {\n                updateSettings(settings);\n            })\n                .catch((reason) => {\n                console.error(reason.message);\n            });\n        }\n        // Show the current file browser shortcut in its title.\n        const updateModeSwitchTitle = () => {\n            const binding = app.commands.keyBindings.find(b => b.command === 'application:toggle-mode');\n            if (binding) {\n                const ks = binding.keys.map(_lumino_commands__WEBPACK_IMPORTED_MODULE_11__.CommandRegistry.formatKeystroke).join(', ');\n                modeSwitch.caption = trans.__('Simple Interface (%1)', ks);\n            }\n            else {\n                modeSwitch.caption = trans.__('Simple Interface');\n            }\n        };\n        updateModeSwitchTitle();\n        app.commands.keyBindingChanged.connect(() => {\n            updateModeSwitchTitle();\n        });\n        modeSwitch.label = trans.__('Simple');\n        statusBar.registerStatusItem(modeSwitchPlugin.id, {\n            priority: 1,\n            item: modeSwitch,\n            align: 'left',\n            rank: -1\n        });\n    },\n    autoStart: true\n};\n/**\n * Export the plugins as default.\n */\nconst plugins = [\n    contextMenuPlugin,\n    dirty,\n    main,\n    mainCommands,\n    layout,\n    router,\n    tree,\n    notfound,\n    busy,\n    shell,\n    status,\n    info,\n    modeSwitchPlugin,\n    paths,\n    propertyInspector,\n    jupyterLogo,\n    _topbar__WEBPACK_IMPORTED_MODULE_15__.topbar\n];\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (plugins);\nvar Private;\n(function (Private) {\n    async function displayInformation(trans) {\n        const result = await (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.showDialog)({\n            title: trans.__('Information'),\n            body: trans.__('Context menu customization has changed. You will need to reload JupyterLab to see the changes.'),\n            buttons: [\n                _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Dialog.cancelButton(),\n                _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Dialog.okButton({ label: trans.__('Reload') })\n            ]\n        });\n        if (result.button.accept) {\n            location.reload();\n        }\n    }\n    async function loadSettingsContextMenu(contextMenu, registry, menuFactory, translator) {\n        var _a;\n        const trans = translator.load('jupyterlab');\n        const pluginId = contextMenuPlugin.id;\n        let canonical = null;\n        let loaded = {};\n        /**\n         * Populate the plugin's schema defaults.\n         *\n         * We keep track of disabled entries in case the plugin is loaded\n         * after the menu initialization.\n         */\n        function populate(schema) {\n            var _a, _b;\n            loaded = {};\n            const pluginDefaults = Object.keys(registry.plugins)\n                .map(plugin => {\n                var _a, _b;\n                const items = (_b = (_a = registry.plugins[plugin].schema['jupyter.lab.menus']) === null || _a === void 0 ? void 0 : _a.context) !== null && _b !== void 0 ? _b : [];\n                loaded[plugin] = items;\n                return items;\n            })\n                .concat([(_b = (_a = schema['jupyter.lab.menus']) === null || _a === void 0 ? void 0 : _a.context) !== null && _b !== void 0 ? _b : []])\n                .reduceRight((acc, val) => _jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_4__.SettingRegistry.reconcileItems(acc, val, true), []);\n            // Apply default value as last step to take into account overrides.json\n            // The standard default being [] as the plugin must use `jupyter.lab.menus.context`\n            // to define their default value.\n            schema.properties.contextMenu.default = _jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_4__.SettingRegistry.reconcileItems(pluginDefaults, schema.properties.contextMenu.default, true)\n                // flatten one level\n                .sort((a, b) => { var _a, _b; return ((_a = a.rank) !== null && _a !== void 0 ? _a : Infinity) - ((_b = b.rank) !== null && _b !== void 0 ? _b : Infinity); });\n        }\n        // Transform the plugin object to return different schema than the default.\n        registry.transform(pluginId, {\n            compose: plugin => {\n                var _a, _b, _c, _d;\n                // Only override the canonical schema the first time.\n                if (!canonical) {\n                    canonical = _lumino_coreutils__WEBPACK_IMPORTED_MODULE_10__.JSONExt.deepCopy(plugin.schema);\n                    populate(canonical);\n                }\n                const defaults = (_c = (_b = (_a = canonical.properties) === null || _a === void 0 ? void 0 : _a.contextMenu) === null || _b === void 0 ? void 0 : _b.default) !== null && _c !== void 0 ? _c : [];\n                const user = {\n                    ...plugin.data.user,\n                    contextMenu: (_d = plugin.data.user.contextMenu) !== null && _d !== void 0 ? _d : []\n                };\n                const composite = {\n                    ...plugin.data.composite,\n                    contextMenu: _jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_4__.SettingRegistry.reconcileItems(defaults, user.contextMenu, false)\n                };\n                plugin.data = { composite, user };\n                return plugin;\n            },\n            fetch: plugin => {\n                // Only override the canonical schema the first time.\n                if (!canonical) {\n                    canonical = _lumino_coreutils__WEBPACK_IMPORTED_MODULE_10__.JSONExt.deepCopy(plugin.schema);\n                    populate(canonical);\n                }\n                return {\n                    data: plugin.data,\n                    id: plugin.id,\n                    raw: plugin.raw,\n                    schema: canonical,\n                    version: plugin.version\n                };\n            }\n        });\n        // Repopulate the canonical variable after the setting registry has\n        // preloaded all initial plugins.\n        const settings = await registry.load(pluginId);\n        const contextItems = (_a = settings.composite.contextMenu) !== null && _a !== void 0 ? _a : [];\n        // Create menu item for non-disabled element\n        _jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_4__.SettingRegistry.filterDisabledItems(contextItems).forEach(item => {\n            _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.MenuFactory.addContextItem({\n                // We have to set the default rank because Lumino is sorting the visible items\n                rank: DEFAULT_CONTEXT_ITEM_RANK,\n                ...item\n            }, contextMenu, menuFactory);\n        });\n        settings.changed.connect(() => {\n            var _a;\n            // As extension may change the context menu through API,\n            // prompt the user to reload if the menu has been updated.\n            const newItems = (_a = settings.composite.contextMenu) !== null && _a !== void 0 ? _a : [];\n            if (!_lumino_coreutils__WEBPACK_IMPORTED_MODULE_10__.JSONExt.deepEqual(contextItems, newItems)) {\n                void displayInformation(trans);\n            }\n        });\n        registry.pluginChanged.connect(async (sender, plugin) => {\n            var _a, _b, _c, _d;\n            if (plugin !== pluginId) {\n                // If the plugin changed its menu.\n                const oldItems = (_a = loaded[plugin]) !== null && _a !== void 0 ? _a : [];\n                const newItems = (_c = (_b = registry.plugins[plugin].schema['jupyter.lab.menus']) === null || _b === void 0 ? void 0 : _b.context) !== null && _c !== void 0 ? _c : [];\n                if (!_lumino_coreutils__WEBPACK_IMPORTED_MODULE_10__.JSONExt.deepEqual(oldItems, newItems)) {\n                    if (loaded[plugin]) {\n                        // The plugin has changed, request the user to reload the UI\n                        await displayInformation(trans);\n                    }\n                    else {\n                        // The plugin was not yet loaded when the menu was built => update the menu\n                        loaded[plugin] = _lumino_coreutils__WEBPACK_IMPORTED_MODULE_10__.JSONExt.deepCopy(newItems);\n                        // Merge potential disabled state\n                        const toAdd = (_d = _jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_4__.SettingRegistry.reconcileItems(newItems, contextItems, false, false)) !== null && _d !== void 0 ? _d : [];\n                        _jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_4__.SettingRegistry.filterDisabledItems(toAdd).forEach(item => {\n                            _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.MenuFactory.addContextItem({\n                                // We have to set the default rank because Lumino is sorting the visible items\n                                rank: DEFAULT_CONTEXT_ITEM_RANK,\n                                ...item\n                            }, contextMenu, menuFactory);\n                        });\n                    }\n                }\n            }\n        });\n    }\n    Private.loadSettingsContextMenu = loadSettingsContextMenu;\n    function activateSidebarSwitcher(app, labShell, settings, trans) {\n        // Add a command to switch a side panels's side\n        app.commands.addCommand(CommandIDs.switchSidebar, {\n            label: trans.__('Switch Sidebar Side'),\n            execute: () => {\n                // First, try to find the correct panel based on the application\n                // context menu click. Bail if we don't find a sidebar for the widget.\n                const contextNode = app.contextMenuHitTest(node => !!node.dataset.id);\n                if (!contextNode) {\n                    return;\n                }\n                const id = contextNode.dataset['id'];\n                const leftPanel = document.getElementById('jp-left-stack');\n                const node = document.getElementById(id);\n                let newLayout = null;\n                // Move the panel to the other side.\n                if (leftPanel && node && leftPanel.contains(node)) {\n                    const widget = (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_9__.find)(labShell.widgets('left'), w => w.id === id);\n                    if (widget) {\n                        newLayout = labShell.move(widget, 'right');\n                        labShell.activateById(widget.id);\n                    }\n                }\n                else {\n                    const widget = (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_9__.find)(labShell.widgets('right'), w => w.id === id);\n                    if (widget) {\n                        newLayout = labShell.move(widget, 'left');\n                        labShell.activateById(widget.id);\n                    }\n                }\n                if (newLayout) {\n                    settings\n                        .set('layout', {\n                        single: newLayout['single-document'],\n                        multiple: newLayout['multiple-document']\n                    })\n                        .catch(reason => {\n                        console.error('Failed to save user layout customization.', reason);\n                    });\n                }\n            }\n        });\n        app.commands.commandExecuted.connect((registry, executed) => {\n            if (executed.id === CommandIDs.resetLayout) {\n                settings.remove('layout').catch(reason => {\n                    console.error('Failed to remove user layout customization.', reason);\n                });\n            }\n        });\n    }\n    Private.activateSidebarSwitcher = activateSidebarSwitcher;\n})(Private || (Private = {}));\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/application-extension/lib/index.js?");

/***/ }),

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

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   topbar: () => (/* binding */ topbar)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/apputils */ \"webpack/sharing/consume/default/@jupyterlab/apputils/@jupyterlab/apputils\");\n/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/settingregistry */ \"webpack/sharing/consume/default/@jupyterlab/settingregistry/@jupyterlab/settingregistry\");\n/* harmony import */ var _jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyterlab/translation */ \"webpack/sharing/consume/default/@jupyterlab/translation/@jupyterlab/translation\");\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_3__ = __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_3___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_3__);\n/*\n * Copyright (c) Jupyter Development Team.\n * Distributed under the terms of the Modified BSD License.\n */\n\n\n\n\nconst TOPBAR_FACTORY = 'TopBar';\n/**\n * A plugin adding a toolbar to the top area.\n */\nconst topbar = {\n    id: '@jupyterlab/application-extension:top-bar',\n    description: 'Adds a toolbar to the top area (next to the main menu bar).',\n    autoStart: true,\n    requires: [_jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_1__.ISettingRegistry, _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.IToolbarWidgetRegistry],\n    optional: [_jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2__.ITranslator],\n    activate: (app, settingRegistry, toolbarRegistry, translator) => {\n        const toolbar = new _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_3__.Toolbar();\n        toolbar.id = 'jp-top-bar';\n        // Set toolbar\n        (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.setToolbar)(toolbar, (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.createToolbarFactory)(toolbarRegistry, settingRegistry, TOPBAR_FACTORY, topbar.id, translator !== null && translator !== void 0 ? translator : _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2__.nullTranslator), toolbar);\n        app.shell.add(toolbar, 'top', { rank: 900 });\n    }\n};\n//# sourceMappingURL=topbar.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/application-extension/lib/topbar.js?");

/***/ })

}]);