/*
 * 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_fileeditor_lib_index_js"],{

/***/ "../node_modules/@jupyterlab/fileeditor/lib/index.js":
/*!***********************************************************!*\
  !*** ../node_modules/@jupyterlab/fileeditor/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 */   \"TabSpaceStatus\": () => (/* reexport safe */ _tabspacestatus__WEBPACK_IMPORTED_MODULE_0__.TabSpaceStatus),\n/* harmony export */   \"IEditorTracker\": () => (/* reexport safe */ _tokens__WEBPACK_IMPORTED_MODULE_1__.IEditorTracker),\n/* harmony export */   \"FileEditor\": () => (/* reexport safe */ _widget__WEBPACK_IMPORTED_MODULE_2__.FileEditor),\n/* harmony export */   \"FileEditorCodeWrapper\": () => (/* reexport safe */ _widget__WEBPACK_IMPORTED_MODULE_2__.FileEditorCodeWrapper),\n/* harmony export */   \"FileEditorFactory\": () => (/* reexport safe */ _widget__WEBPACK_IMPORTED_MODULE_2__.FileEditorFactory)\n/* harmony export */ });\n/* harmony import */ var _tabspacestatus__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tabspacestatus */ \"../node_modules/@jupyterlab/fileeditor/lib/tabspacestatus.js\");\n/* harmony import */ var _tokens__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./tokens */ \"../node_modules/@jupyterlab/fileeditor/lib/tokens.js\");\n/* harmony import */ var _widget__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./widget */ \"../node_modules/@jupyterlab/fileeditor/lib/widget.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/**\n * @packageDocumentation\n * @module fileeditor\n */\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/fileeditor/lib/index.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/fileeditor/lib/tabspacestatus.js":
/*!********************************************************************!*\
  !*** ../node_modules/@jupyterlab/fileeditor/lib/tabspacestatus.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 */   \"TabSpaceStatus\": () => (/* binding */ TabSpaceStatus)\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_statusbar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/statusbar */ \"webpack/sharing/consume/default/@jupyterlab/statusbar/@jupyterlab/statusbar\");\n/* harmony import */ var _jupyterlab_statusbar__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_statusbar__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 react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"webpack/sharing/consume/default/react/react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n\n\n/**\n * A pure functional component for rendering the TabSpace status.\n */\nfunction TabSpaceComponent(props) {\n    const translator = props.translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2__.nullTranslator;\n    const trans = translator.load('jupyterlab');\n    const description = props.isSpaces\n        ? trans.__('Spaces')\n        : trans.__('Tab Size');\n    return (react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_jupyterlab_statusbar__WEBPACK_IMPORTED_MODULE_1__.TextItem, { onClick: props.handleClick, source: `${description}: ${props.tabSpace}`, title: trans.__('Change Tab indentation…') }));\n}\n/**\n * A VDomRenderer for a tabs vs. spaces status item.\n */\nclass TabSpaceStatus extends _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.VDomRenderer {\n    /**\n     * Create a new tab/space status item.\n     */\n    constructor(options) {\n        super(new TabSpaceStatus.Model());\n        this._popup = null;\n        this._menu = options.menu;\n        this.translator = options.translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2__.nullTranslator;\n        this.addClass(_jupyterlab_statusbar__WEBPACK_IMPORTED_MODULE_1__.interactiveItem);\n    }\n    /**\n     * Render the TabSpace status item.\n     */\n    render() {\n        if (!this.model || !this.model.config) {\n            return null;\n        }\n        else {\n            return (react__WEBPACK_IMPORTED_MODULE_3___default().createElement(TabSpaceComponent, { isSpaces: this.model.config.insertSpaces, tabSpace: this.model.config.tabSize, handleClick: () => this._handleClick(), translator: this.translator }));\n        }\n    }\n    /**\n     * Handle a click on the status item.\n     */\n    _handleClick() {\n        const menu = this._menu;\n        if (this._popup) {\n            this._popup.dispose();\n        }\n        menu.aboutToClose.connect(this._menuClosed, this);\n        this._popup = (0,_jupyterlab_statusbar__WEBPACK_IMPORTED_MODULE_1__.showPopup)({\n            body: menu,\n            anchor: this,\n            align: 'right'\n        });\n    }\n    _menuClosed() {\n        this.removeClass(_jupyterlab_statusbar__WEBPACK_IMPORTED_MODULE_1__.clickedItem);\n    }\n}\n/**\n * A namespace for TabSpace statics.\n */\n(function (TabSpaceStatus) {\n    /**\n     * A VDomModel for the TabSpace status item.\n     */\n    class Model extends _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.VDomModel {\n        constructor() {\n            super(...arguments);\n            this._config = null;\n        }\n        /**\n         * The editor config from the settings system.\n         */\n        get config() {\n            return this._config;\n        }\n        set config(val) {\n            const oldConfig = this._config;\n            this._config = val;\n            this._triggerChange(oldConfig, this._config);\n        }\n        _triggerChange(oldValue, newValue) {\n            const oldSpaces = oldValue && oldValue.insertSpaces;\n            const oldSize = oldValue && oldValue.tabSize;\n            const newSpaces = newValue && newValue.insertSpaces;\n            const newSize = newValue && newValue.tabSize;\n            if (oldSpaces !== newSpaces || oldSize !== newSize) {\n                this.stateChanged.emit(void 0);\n            }\n        }\n    }\n    TabSpaceStatus.Model = Model;\n})(TabSpaceStatus || (TabSpaceStatus = {}));\n//# sourceMappingURL=tabspacestatus.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/fileeditor/lib/tabspacestatus.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/fileeditor/lib/tokens.js":
/*!************************************************************!*\
  !*** ../node_modules/@jupyterlab/fileeditor/lib/tokens.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 */   \"IEditorTracker\": () => (/* binding */ IEditorTracker)\n/* harmony export */ });\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @lumino/coreutils */ \"webpack/sharing/consume/default/@lumino/coreutils/@lumino/coreutils\");\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n/* tslint:disable */\n/**\n * The editor tracker token.\n */\nconst IEditorTracker = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__.Token('@jupyterlab/fileeditor:IEditorTracker');\n/* tslint:enable */\n//# sourceMappingURL=tokens.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/fileeditor/lib/tokens.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/fileeditor/lib/widget.js":
/*!************************************************************!*\
  !*** ../node_modules/@jupyterlab/fileeditor/lib/widget.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 */   \"FileEditorCodeWrapper\": () => (/* binding */ FileEditorCodeWrapper),\n/* harmony export */   \"FileEditor\": () => (/* binding */ FileEditor),\n/* harmony export */   \"FileEditorFactory\": () => (/* binding */ FileEditorFactory)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/codeeditor */ \"webpack/sharing/consume/default/@jupyterlab/codeeditor/@jupyterlab/codeeditor\");\n/* harmony import */ var _jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _jupyterlab_docregistry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/docregistry */ \"webpack/sharing/consume/default/@jupyterlab/docregistry/@jupyterlab/docregistry\");\n/* harmony import */ var _jupyterlab_docregistry__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_docregistry__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__ = __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_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @lumino/coreutils */ \"webpack/sharing/consume/default/@lumino/coreutils/@lumino/coreutils\");\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @lumino/widgets */ \"webpack/sharing/consume/default/@lumino/widgets/@lumino/widgets\");\n/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_lumino_widgets__WEBPACK_IMPORTED_MODULE_4__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n\n\n\n/**\n * The data attribute added to a widget that can run code.\n */\nconst CODE_RUNNER = 'jpCodeRunner';\n/**\n * The data attribute added to a widget that can undo.\n */\nconst UNDOER = 'jpUndoer';\n/**\n * A code editor wrapper for the file editor.\n */\nclass FileEditorCodeWrapper extends _jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_0__.CodeEditorWrapper {\n    /**\n     * Construct a new editor widget.\n     */\n    constructor(options) {\n        super({\n            factory: options.factory,\n            model: options.context.model\n        });\n        this._ready = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_3__.PromiseDelegate();\n        const context = (this._context = options.context);\n        const editor = this.editor;\n        this.addClass('jp-FileEditorCodeWrapper');\n        this.node.dataset[CODE_RUNNER] = 'true';\n        this.node.dataset[UNDOER] = 'true';\n        editor.model.value.text = context.model.toString();\n        void context.ready.then(() => {\n            this._onContextReady();\n        });\n        if (context.model.modelDB.isCollaborative) {\n            const modelDB = context.model.modelDB;\n            void modelDB.connected.then(() => {\n                const collaborators = modelDB.collaborators;\n                if (!collaborators) {\n                    return;\n                }\n                // Setup the selection style for collaborators\n                const localCollaborator = collaborators.localCollaborator;\n                this.editor.uuid = localCollaborator.sessionId;\n                this.editor.selectionStyle = Object.assign(Object.assign({}, _jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_0__.CodeEditor.defaultSelectionStyle), { color: localCollaborator.color });\n                collaborators.changed.connect(this._onCollaboratorsChanged, this);\n                // Trigger an initial onCollaboratorsChanged event.\n                this._onCollaboratorsChanged();\n            });\n        }\n    }\n    /**\n     * Get the context for the editor widget.\n     */\n    get context() {\n        return this._context;\n    }\n    /**\n     * A promise that resolves when the file editor is ready.\n     */\n    get ready() {\n        return this._ready.promise;\n    }\n    /**\n     * Handle actions that should be taken when the context is ready.\n     */\n    _onContextReady() {\n        if (this.isDisposed) {\n            return;\n        }\n        const contextModel = this._context.model;\n        const editor = this.editor;\n        const editorModel = editor.model;\n        // Set the editor model value.\n        editorModel.value.text = contextModel.toString();\n        // Prevent the initial loading from disk from being in the editor history.\n        editor.clearHistory();\n        // Wire signal connections.\n        contextModel.contentChanged.connect(this._onContentChanged, this);\n        // Resolve the ready promise.\n        this._ready.resolve(undefined);\n    }\n    /**\n     * Handle a change in context model content.\n     */\n    _onContentChanged() {\n        const editorModel = this.editor.model;\n        const oldValue = editorModel.value.text;\n        const newValue = this._context.model.toString();\n        if (oldValue !== newValue) {\n            editorModel.value.text = newValue;\n        }\n    }\n    /**\n     * Handle a change to the collaborators on the model\n     * by updating UI elements associated with them.\n     */\n    _onCollaboratorsChanged() {\n        // If there are selections corresponding to non-collaborators,\n        // they are stale and should be removed.\n        const collaborators = this._context.model.modelDB.collaborators;\n        if (!collaborators) {\n            return;\n        }\n        for (const key of this.editor.model.selections.keys()) {\n            if (!collaborators.has(key)) {\n                this.editor.model.selections.delete(key);\n            }\n        }\n    }\n}\n/**\n * A widget for editors.\n */\nclass FileEditor extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_4__.Widget {\n    /**\n     * Construct a new editor widget.\n     */\n    constructor(options) {\n        super();\n        this.addClass('jp-FileEditor');\n        const context = (this._context = options.context);\n        this._mimeTypeService = options.mimeTypeService;\n        const editorWidget = (this.editorWidget = new FileEditorCodeWrapper(options));\n        this.editor = editorWidget.editor;\n        this.model = editorWidget.model;\n        // Listen for changes to the path.\n        context.pathChanged.connect(this._onPathChanged, this);\n        this._onPathChanged();\n        const layout = (this.layout = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_4__.StackedLayout());\n        layout.addWidget(editorWidget);\n    }\n    /**\n     * Get the context for the editor widget.\n     */\n    get context() {\n        return this.editorWidget.context;\n    }\n    /**\n     * A promise that resolves when the file editor is ready.\n     */\n    get ready() {\n        return this.editorWidget.ready;\n    }\n    /**\n     * Handle the DOM events for the widget.\n     *\n     * @param event - The DOM event sent to the widget.\n     *\n     * #### Notes\n     * This method implements the DOM `EventListener` interface and is\n     * called in response to events on the widget's node. It should\n     * not be called directly by user code.\n     */\n    handleEvent(event) {\n        if (!this.model) {\n            return;\n        }\n        switch (event.type) {\n            case 'mousedown':\n                this._ensureFocus();\n                break;\n            default:\n                break;\n        }\n    }\n    /**\n     * Handle `after-attach` messages for the widget.\n     */\n    onAfterAttach(msg) {\n        super.onAfterAttach(msg);\n        const node = this.node;\n        node.addEventListener('mousedown', this);\n    }\n    /**\n     * Handle `before-detach` messages for the widget.\n     */\n    onBeforeDetach(msg) {\n        const node = this.node;\n        node.removeEventListener('mousedown', this);\n    }\n    /**\n     * Handle `'activate-request'` messages.\n     */\n    onActivateRequest(msg) {\n        this._ensureFocus();\n    }\n    /**\n     * Ensure that the widget has focus.\n     */\n    _ensureFocus() {\n        if (!this.editor.hasFocus()) {\n            this.editor.focus();\n        }\n    }\n    /**\n     * Handle a change to the path.\n     */\n    _onPathChanged() {\n        const editor = this.editor;\n        const localPath = this._context.localPath;\n        editor.model.mimeType = this._mimeTypeService.getMimeTypeByFilePath(localPath);\n    }\n}\n/**\n * A widget factory for editors.\n */\nclass FileEditorFactory extends _jupyterlab_docregistry__WEBPACK_IMPORTED_MODULE_1__.ABCWidgetFactory {\n    /**\n     * Construct a new editor widget factory.\n     */\n    constructor(options) {\n        super(options.factoryOptions);\n        this._services = options.editorServices;\n    }\n    /**\n     * Create a new widget given a context.\n     */\n    createNewWidget(context) {\n        const func = this._services.factoryService.newDocumentEditor;\n        const factory = options => {\n            return func(options);\n        };\n        const content = new FileEditor({\n            factory,\n            context,\n            mimeTypeService: this._services.mimeTypeService\n        });\n        content.title.icon = _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.textEditorIcon;\n        const widget = new _jupyterlab_docregistry__WEBPACK_IMPORTED_MODULE_1__.DocumentWidget({ content, context });\n        return widget;\n    }\n}\n//# sourceMappingURL=widget.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/fileeditor/lib/widget.js?");

/***/ })

}]);