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

/***/ "../node_modules/@jupyterlab/outputarea/lib/index.js":
/*!***********************************************************!*\
  !*** ../node_modules/@jupyterlab/outputarea/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 */   \"OutputAreaModel\": () => (/* reexport safe */ _model__WEBPACK_IMPORTED_MODULE_0__.OutputAreaModel),\n/* harmony export */   \"OutputArea\": () => (/* reexport safe */ _widget__WEBPACK_IMPORTED_MODULE_1__.OutputArea),\n/* harmony export */   \"OutputPrompt\": () => (/* reexport safe */ _widget__WEBPACK_IMPORTED_MODULE_1__.OutputPrompt),\n/* harmony export */   \"SimplifiedOutputArea\": () => (/* reexport safe */ _widget__WEBPACK_IMPORTED_MODULE_1__.SimplifiedOutputArea),\n/* harmony export */   \"Stdin\": () => (/* reexport safe */ _widget__WEBPACK_IMPORTED_MODULE_1__.Stdin)\n/* harmony export */ });\n/* harmony import */ var _model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./model */ \"../node_modules/@jupyterlab/outputarea/lib/model.js\");\n/* harmony import */ var _widget__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./widget */ \"../node_modules/@jupyterlab/outputarea/lib/widget.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/**\n * @packageDocumentation\n * @module outputarea\n */\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/outputarea/lib/index.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/outputarea/lib/model.js":
/*!***********************************************************!*\
  !*** ../node_modules/@jupyterlab/outputarea/lib/model.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 */   \"OutputAreaModel\": () => (/* binding */ OutputAreaModel)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_nbformat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/nbformat */ \"webpack/sharing/consume/default/@jupyterlab/nbformat/@jupyterlab/nbformat\");\n/* harmony import */ var _jupyterlab_nbformat__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_nbformat__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _jupyterlab_observables__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/observables */ \"webpack/sharing/consume/default/@jupyterlab/observables/@jupyterlab/observables\");\n/* harmony import */ var _jupyterlab_observables__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_observables__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyterlab/rendermime */ \"webpack/sharing/consume/default/@jupyterlab/rendermime/@jupyterlab/rendermime\");\n/* harmony import */ var _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @lumino/algorithm */ \"webpack/sharing/consume/default/@lumino/algorithm/@lumino/algorithm\");\n/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @lumino/coreutils */ \"webpack/sharing/consume/default/@lumino/coreutils/@lumino/coreutils\");\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @lumino/signaling */ \"webpack/sharing/consume/default/@lumino/signaling/@lumino/signaling\");\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_lumino_signaling__WEBPACK_IMPORTED_MODULE_5__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n\n\n\n\n/**\n * The default implementation of the IOutputAreaModel.\n */\nclass OutputAreaModel {\n    /**\n     * Construct a new observable outputs instance.\n     */\n    constructor(options = {}) {\n        /**\n         * A flag that is set when we want to clear the output area\n         * *after* the next addition to it.\n         */\n        this.clearNext = false;\n        this._trusted = false;\n        this._isDisposed = false;\n        this._stateChanged = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_5__.Signal(this);\n        this._changed = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_5__.Signal(this);\n        this._trusted = !!options.trusted;\n        this.contentFactory =\n            options.contentFactory || OutputAreaModel.defaultContentFactory;\n        this.list = new _jupyterlab_observables__WEBPACK_IMPORTED_MODULE_1__.ObservableList();\n        if (options.values) {\n            (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.each)(options.values, value => {\n                this._add(value);\n            });\n        }\n        this.list.changed.connect(this._onListChanged, this);\n    }\n    /**\n     * A signal emitted when the model state changes.\n     */\n    get stateChanged() {\n        return this._stateChanged;\n    }\n    /**\n     * A signal emitted when the model changes.\n     */\n    get changed() {\n        return this._changed;\n    }\n    /**\n     * Get the length of the items in the model.\n     */\n    get length() {\n        return this.list ? this.list.length : 0;\n    }\n    /**\n     * Get whether the model is trusted.\n     */\n    get trusted() {\n        return this._trusted;\n    }\n    /**\n     * Set whether the model is trusted.\n     *\n     * #### Notes\n     * Changing the value will cause all of the models to re-set.\n     */\n    set trusted(value) {\n        if (value === this._trusted) {\n            return;\n        }\n        const trusted = (this._trusted = value);\n        for (let i = 0; i < this.list.length; i++) {\n            let item = this.list.get(i);\n            const value = item.toJSON();\n            item.dispose();\n            item = this._createItem({ value, trusted });\n            this.list.set(i, item);\n        }\n    }\n    /**\n     * Test whether the model is disposed.\n     */\n    get isDisposed() {\n        return this._isDisposed;\n    }\n    /**\n     * Dispose of the resources used by the model.\n     */\n    dispose() {\n        if (this.isDisposed) {\n            return;\n        }\n        this._isDisposed = true;\n        this.list.dispose();\n        _lumino_signaling__WEBPACK_IMPORTED_MODULE_5__.Signal.clearData(this);\n    }\n    /**\n     * Get an item at the specified index.\n     */\n    get(index) {\n        return this.list.get(index);\n    }\n    /**\n     * Set the value at the specified index.\n     */\n    set(index, value) {\n        value = _lumino_coreutils__WEBPACK_IMPORTED_MODULE_4__.JSONExt.deepCopy(value);\n        // Normalize stream data.\n        Private.normalize(value);\n        const item = this._createItem({ value, trusted: this._trusted });\n        this.list.set(index, item);\n    }\n    /**\n     * Add an output, which may be combined with previous output.\n     *\n     * @returns The total number of outputs.\n     *\n     * #### Notes\n     * The output bundle is copied.\n     * Contiguous stream outputs of the same `name` are combined.\n     */\n    add(output) {\n        // If we received a delayed clear message, then clear now.\n        if (this.clearNext) {\n            this.clear();\n            this.clearNext = false;\n        }\n        return this._add(output);\n    }\n    /**\n     * Clear all of the output.\n     *\n     * @param wait Delay clearing the output until the next message is added.\n     */\n    clear(wait = false) {\n        this._lastStream = '';\n        if (wait) {\n            this.clearNext = true;\n            return;\n        }\n        (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.each)(this.list, (item) => {\n            item.dispose();\n        });\n        this.list.clear();\n    }\n    /**\n     * Deserialize the model from JSON.\n     *\n     * #### Notes\n     * This will clear any existing data.\n     */\n    fromJSON(values) {\n        this.clear();\n        (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.each)(values, value => {\n            this._add(value);\n        });\n    }\n    /**\n     * Serialize the model to JSON.\n     */\n    toJSON() {\n        return (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.toArray)((0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.map)(this.list, (output) => output.toJSON()));\n    }\n    /**\n     * Add a copy of the item to the list.\n     */\n    _add(value) {\n        const trusted = this._trusted;\n        value = _lumino_coreutils__WEBPACK_IMPORTED_MODULE_4__.JSONExt.deepCopy(value);\n        // Normalize the value.\n        Private.normalize(value);\n        // Consolidate outputs if they are stream outputs of the same kind.\n        if (_jupyterlab_nbformat__WEBPACK_IMPORTED_MODULE_0__.isStream(value) &&\n            this._lastStream &&\n            value.name === this._lastName &&\n            this.shouldCombine({\n                value,\n                lastModel: this.list.get(this.length - 1)\n            })) {\n            // In order to get a list change event, we add the previous\n            // text to the current item and replace the previous item.\n            // This also replaces the metadata of the last item.\n            this._lastStream += value.text;\n            this._lastStream = Private.removeOverwrittenChars(this._lastStream);\n            value.text = this._lastStream;\n            const item = this._createItem({ value, trusted });\n            const index = this.length - 1;\n            const prev = this.list.get(index);\n            prev.dispose();\n            this.list.set(index, item);\n            return index;\n        }\n        if (_jupyterlab_nbformat__WEBPACK_IMPORTED_MODULE_0__.isStream(value)) {\n            value.text = Private.removeOverwrittenChars(value.text);\n        }\n        // Create the new item.\n        const item = this._createItem({ value, trusted });\n        // Update the stream information.\n        if (_jupyterlab_nbformat__WEBPACK_IMPORTED_MODULE_0__.isStream(value)) {\n            this._lastStream = value.text;\n            this._lastName = value.name;\n        }\n        else {\n            this._lastStream = '';\n        }\n        // Add the item to our list and return the new length.\n        return this.list.push(item);\n    }\n    /**\n     * Whether a new value should be consolidated with the previous output.\n     *\n     * This will only be called if the minimal criteria of both being stream\n     * messages of the same type.\n     */\n    shouldCombine(options) {\n        return true;\n    }\n    /**\n     * Create an output item and hook up its signals.\n     */\n    _createItem(options) {\n        const factory = this.contentFactory;\n        const item = factory.createOutputModel(options);\n        item.changed.connect(this._onGenericChange, this);\n        return item;\n    }\n    /**\n     * Handle a change to the list.\n     */\n    _onListChanged(sender, args) {\n        this._changed.emit(args);\n    }\n    /**\n     * Handle a change to an item.\n     */\n    _onGenericChange() {\n        this._stateChanged.emit(void 0);\n    }\n}\n/**\n * The namespace for OutputAreaModel class statics.\n */\n(function (OutputAreaModel) {\n    /**\n     * The default implementation of a `IModelOutputFactory`.\n     */\n    class ContentFactory {\n        /**\n         * Create an output model.\n         */\n        createOutputModel(options) {\n            return new _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_2__.OutputModel(options);\n        }\n    }\n    OutputAreaModel.ContentFactory = ContentFactory;\n    /**\n     * The default output model factory.\n     */\n    OutputAreaModel.defaultContentFactory = new ContentFactory();\n})(OutputAreaModel || (OutputAreaModel = {}));\n/**\n * A namespace for module-private functionality.\n */\nvar Private;\n(function (Private) {\n    /**\n     * Normalize an output.\n     */\n    function normalize(value) {\n        if (_jupyterlab_nbformat__WEBPACK_IMPORTED_MODULE_0__.isStream(value)) {\n            if (Array.isArray(value.text)) {\n                value.text = value.text.join('\\n');\n            }\n        }\n    }\n    Private.normalize = normalize;\n    /**\n     * Remove characters that are overridden by backspace characters.\n     */\n    function fixBackspace(txt) {\n        let tmp = txt;\n        do {\n            txt = tmp;\n            // Cancel out anything-but-newline followed by backspace\n            tmp = txt.replace(/[^\\n]\\x08/gm, ''); // eslint-disable-line no-control-regex\n        } while (tmp.length < txt.length);\n        return txt;\n    }\n    /**\n     * Remove chunks that should be overridden by the effect of\n     * carriage return characters.\n     */\n    function fixCarriageReturn(txt) {\n        txt = txt.replace(/\\r+\\n/gm, '\\n'); // \\r followed by \\n --> newline\n        while (txt.search(/\\r[^$]/g) > -1) {\n            const base = txt.match(/^(.*)\\r+/m)[1];\n            let insert = txt.match(/\\r+(.*)$/m)[1];\n            insert = insert + base.slice(insert.length, base.length);\n            txt = txt.replace(/\\r+.*$/m, '\\r').replace(/^.*\\r/m, insert);\n        }\n        return txt;\n    }\n    /*\n     * Remove characters overridden by backspaces and carriage returns\n     */\n    function removeOverwrittenChars(text) {\n        return fixCarriageReturn(fixBackspace(text));\n    }\n    Private.removeOverwrittenChars = removeOverwrittenChars;\n})(Private || (Private = {}));\n//# sourceMappingURL=model.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/outputarea/lib/model.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/outputarea/lib/widget.js":
/*!************************************************************!*\
  !*** ../node_modules/@jupyterlab/outputarea/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 */   \"OutputArea\": () => (/* binding */ OutputArea),\n/* harmony export */   \"SimplifiedOutputArea\": () => (/* binding */ SimplifiedOutputArea),\n/* harmony export */   \"OutputPrompt\": () => (/* binding */ OutputPrompt),\n/* harmony export */   \"Stdin\": () => (/* binding */ Stdin)\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_services__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/services */ \"webpack/sharing/consume/default/@jupyterlab/services/@jupyterlab/services\");\n/* harmony import */ var _jupyterlab_services__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_services__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @lumino/coreutils */ \"webpack/sharing/consume/default/@lumino/coreutils/@lumino/coreutils\");\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _lumino_properties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @lumino/properties */ \"webpack/sharing/consume/default/@lumino/properties/@lumino/properties\");\n/* harmony import */ var _lumino_properties__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_lumino_properties__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @lumino/signaling */ \"webpack/sharing/consume/default/@lumino/signaling/@lumino/signaling\");\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_lumino_signaling__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @lumino/widgets */ \"webpack/sharing/consume/default/@lumino/widgets/@lumino/widgets\");\n/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_lumino_widgets__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! resize-observer-polyfill */ \"../node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n\n\n\n\n\n/**\n * The class name added to an output area widget.\n */\nconst OUTPUT_AREA_CLASS = 'jp-OutputArea';\n/**\n * The class name added to the direction children of OutputArea\n */\nconst OUTPUT_AREA_ITEM_CLASS = 'jp-OutputArea-child';\n/**\n * The class name added to actual outputs\n */\nconst OUTPUT_AREA_OUTPUT_CLASS = 'jp-OutputArea-output';\n/**\n * The class name added to prompt children of OutputArea.\n */\nconst OUTPUT_AREA_PROMPT_CLASS = 'jp-OutputArea-prompt';\n/**\n * The class name added to OutputPrompt.\n */\nconst OUTPUT_PROMPT_CLASS = 'jp-OutputPrompt';\n/**\n * The class name added to an execution result.\n */\nconst EXECUTE_CLASS = 'jp-OutputArea-executeResult';\n/**\n * The class name added stdin items of OutputArea\n */\nconst OUTPUT_AREA_STDIN_ITEM_CLASS = 'jp-OutputArea-stdin-item';\n/**\n * The class name added to stdin widgets.\n */\nconst STDIN_CLASS = 'jp-Stdin';\n/**\n * The class name added to stdin data prompt nodes.\n */\nconst STDIN_PROMPT_CLASS = 'jp-Stdin-prompt';\n/**\n * The class name added to stdin data input nodes.\n */\nconst STDIN_INPUT_CLASS = 'jp-Stdin-input';\n/** ****************************************************************************\n * OutputArea\n ******************************************************************************/\n/**\n * An output area widget.\n *\n * #### Notes\n * The widget model must be set separately and can be changed\n * at any time.  Consumers of the widget must account for a\n * `null` model, and may want to listen to the `modelChanged`\n * signal.\n */\nclass OutputArea extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_5__.Widget {\n    /**\n     * Construct an output area widget.\n     */\n    constructor(options) {\n        super();\n        /**\n         * A public signal used to indicate the number of outputs has changed.\n         *\n         * #### Notes\n         * This is useful for parents who want to apply styling based on the number\n         * of outputs. Emits the current number of outputs.\n         */\n        this.outputLengthChanged = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_4__.Signal(this);\n        /**\n         * Handle an iopub message.\n         */\n        this._onIOPub = (msg) => {\n            const model = this.model;\n            const msgType = msg.header.msg_type;\n            let output;\n            const transient = (msg.content.transient || {});\n            const displayId = transient['display_id'];\n            let targets;\n            switch (msgType) {\n                case 'execute_result':\n                case 'display_data':\n                case 'stream':\n                case 'error':\n                    output = Object.assign(Object.assign({}, msg.content), { output_type: msgType });\n                    model.add(output);\n                    break;\n                case 'clear_output': {\n                    const wait = msg.content.wait;\n                    model.clear(wait);\n                    break;\n                }\n                case 'update_display_data':\n                    output = Object.assign(Object.assign({}, msg.content), { output_type: 'display_data' });\n                    targets = this._displayIdMap.get(displayId);\n                    if (targets) {\n                        for (const index of targets) {\n                            model.set(index, output);\n                        }\n                    }\n                    break;\n                default:\n                    break;\n            }\n            if (displayId && msgType === 'display_data') {\n                targets = this._displayIdMap.get(displayId) || [];\n                targets.push(model.length - 1);\n                this._displayIdMap.set(displayId, targets);\n            }\n        };\n        /**\n         * Handle an execute reply message.\n         */\n        this._onExecuteReply = (msg) => {\n            // API responses that contain a pager are special cased and their type\n            // is overridden from 'execute_reply' to 'display_data' in order to\n            // render output.\n            const model = this.model;\n            const content = msg.content;\n            if (content.status !== 'ok') {\n                return;\n            }\n            const payload = content && content.payload;\n            if (!payload || !payload.length) {\n                return;\n            }\n            const pages = payload.filter((i) => i.source === 'page');\n            if (!pages.length) {\n                return;\n            }\n            const page = JSON.parse(JSON.stringify(pages[0]));\n            const output = {\n                output_type: 'display_data',\n                data: page.data,\n                metadata: {}\n            };\n            model.add(output);\n        };\n        this._minHeightTimeout = null;\n        this._displayIdMap = new Map();\n        this._outputTracker = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.WidgetTracker({\n            namespace: _lumino_coreutils__WEBPACK_IMPORTED_MODULE_2__.UUID.uuid4()\n        });\n        const model = (this.model = options.model);\n        this.addClass(OUTPUT_AREA_CLASS);\n        this.rendermime = options.rendermime;\n        this.contentFactory =\n            options.contentFactory || OutputArea.defaultContentFactory;\n        this.layout = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_5__.PanelLayout();\n        this.trimmedOutputModels = new Array();\n        this.maxNumberOutputs = options.maxNumberOutputs || 0;\n        this.headTailNumberOutputs = Math.round(this.maxNumberOutputs / 2);\n        this.headEndIndex = this.headTailNumberOutputs;\n        for (let i = 0; i < model.length; i++) {\n            const output = model.get(i);\n            this._insertOutput(i, output);\n        }\n        model.changed.connect(this.onModelChanged, this);\n        model.stateChanged.connect(this.onStateChanged, this);\n    }\n    /**\n     * A read-only sequence of the children widgets in the output area.\n     */\n    get widgets() {\n        return this.layout.widgets;\n    }\n    /**\n     * The kernel future associated with the output area.\n     */\n    get future() {\n        return this._future;\n    }\n    set future(value) {\n        // Bail if the model is disposed.\n        if (this.model.isDisposed) {\n            throw Error('Model is disposed');\n        }\n        if (this._future === value) {\n            return;\n        }\n        if (this._future) {\n            this._future.dispose();\n        }\n        this._future = value;\n        this.model.clear();\n        // Make sure there were no input widgets.\n        if (this.widgets.length) {\n            this._clear();\n            this.outputLengthChanged.emit(this.model.length);\n        }\n        // Handle published messages.\n        value.onIOPub = this._onIOPub;\n        // Handle the execute reply.\n        value.onReply = this._onExecuteReply;\n        // Handle stdin.\n        value.onStdin = msg => {\n            if (_jupyterlab_services__WEBPACK_IMPORTED_MODULE_1__.KernelMessage.isInputRequestMsg(msg)) {\n                this.onInputRequest(msg, value);\n            }\n        };\n    }\n    /**\n     * Dispose of the resources used by the output area.\n     */\n    dispose() {\n        if (this._future) {\n            this._future.dispose();\n            this._future = null;\n        }\n        this._displayIdMap.clear();\n        this._outputTracker.dispose();\n        super.dispose();\n    }\n    /**\n     * Follow changes on the model state.\n     */\n    onModelChanged(sender, args) {\n        switch (args.type) {\n            case 'add':\n                this._insertOutput(args.newIndex, args.newValues[0]);\n                this.outputLengthChanged.emit(this.model.length);\n                break;\n            case 'remove':\n                if (this.widgets.length) {\n                    // all items removed from model\n                    if (this.model.length === 0) {\n                        this._clear();\n                    }\n                    else {\n                        // range of items removed from model\n                        // remove widgets corresponding to removed model items\n                        const startIndex = args.oldIndex;\n                        for (let i = 0; i < args.oldValues.length && startIndex < this.widgets.length; ++i) {\n                            const widget = this.widgets[startIndex];\n                            widget.parent = null;\n                            widget.dispose();\n                        }\n                        // apply item offset to target model item indices in _displayIdMap\n                        this._moveDisplayIdIndices(startIndex, args.oldValues.length);\n                        // prevent jitter caused by immediate height change\n                        this._preventHeightChangeJitter();\n                    }\n                    this.outputLengthChanged.emit(this.model.length);\n                }\n                break;\n            case 'set':\n                this._setOutput(args.newIndex, args.newValues[0]);\n                this.outputLengthChanged.emit(this.model.length);\n                break;\n            default:\n                break;\n        }\n    }\n    /**\n     * Update indices in _displayIdMap in response to element remove from model items\n     * *\n     * @param startIndex - The index of first element removed\n     *\n     * @param count - The number of elements removed from model items\n     *\n     */\n    _moveDisplayIdIndices(startIndex, count) {\n        this._displayIdMap.forEach((indices) => {\n            const rangeEnd = startIndex + count;\n            const numIndices = indices.length;\n            // reverse loop in order to prevent removing element affecting the index\n            for (let i = numIndices - 1; i >= 0; --i) {\n                const index = indices[i];\n                // remove model item indices in removed range\n                if (index >= startIndex && index < rangeEnd) {\n                    indices.splice(i, 1);\n                }\n                else if (index >= rangeEnd) {\n                    // move model item indices that were larger than range end\n                    indices[i] -= count;\n                }\n            }\n        });\n    }\n    /**\n     * Follow changes on the output model state.\n     */\n    onStateChanged(sender) {\n        this.trimmedOutputModels = new Array();\n        for (let i = 0; i < this.model.length; i++) {\n            this._setOutput(i, this.model.get(i));\n        }\n        this.outputLengthChanged.emit(this.model.length);\n    }\n    /**\n     * Clear the widget inputs and outputs.\n     */\n    _clear() {\n        // Bail if there is no work to do.\n        if (!this.widgets.length) {\n            return;\n        }\n        // Remove all of our widgets.\n        const length = this.widgets.length;\n        for (let i = 0; i < length; i++) {\n            const widget = this.widgets[0];\n            widget.parent = null;\n            widget.dispose();\n        }\n        // Clear the display id map.\n        this._displayIdMap.clear();\n        // prevent jitter caused by immediate height change\n        this._preventHeightChangeJitter();\n    }\n    _preventHeightChangeJitter() {\n        // When an output area is cleared and then quickly replaced with new\n        // content (as happens with @interact in widgets, for example), the\n        // quickly changing height can make the page jitter.\n        // We introduce a small delay in the minimum height\n        // to prevent this jitter.\n        const rect = this.node.getBoundingClientRect();\n        this.node.style.minHeight = `${rect.height}px`;\n        if (this._minHeightTimeout) {\n            window.clearTimeout(this._minHeightTimeout);\n        }\n        this._minHeightTimeout = window.setTimeout(() => {\n            if (this.isDisposed) {\n                return;\n            }\n            this.node.style.minHeight = '';\n        }, 50);\n    }\n    /**\n     * Handle an input request from a kernel.\n     */\n    onInputRequest(msg, future) {\n        // Add an output widget to the end.\n        const factory = this.contentFactory;\n        const stdinPrompt = msg.content.prompt;\n        const password = msg.content.password;\n        const panel = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_5__.Panel();\n        panel.addClass(OUTPUT_AREA_ITEM_CLASS);\n        panel.addClass(OUTPUT_AREA_STDIN_ITEM_CLASS);\n        const prompt = factory.createOutputPrompt();\n        prompt.addClass(OUTPUT_AREA_PROMPT_CLASS);\n        panel.addWidget(prompt);\n        const input = factory.createStdin({\n            prompt: stdinPrompt,\n            password,\n            future\n        });\n        input.addClass(OUTPUT_AREA_OUTPUT_CLASS);\n        panel.addWidget(input);\n        const layout = this.layout;\n        layout.addWidget(panel);\n        /**\n         * Wait for the stdin to complete, add it to the model (so it persists)\n         * and remove the stdin widget.\n         */\n        void input.value.then(value => {\n            // Use stdin as the stream so it does not get combined with stdout.\n            this.model.add({\n                output_type: 'stream',\n                name: 'stdin',\n                text: value + '\\n'\n            });\n            panel.dispose();\n        });\n    }\n    /**\n     * Update an output in the layout in place.\n     */\n    _setOutput(index, model) {\n        const layout = this.layout;\n        const panel = layout.widgets[index];\n        const renderer = (panel.widgets\n            ? panel.widgets[1]\n            : panel);\n        // Check whether it is safe to reuse renderer:\n        // - Preferred mime type has not changed\n        // - Isolation has not changed\n        const mimeType = this.rendermime.preferredMimeType(model.data, model.trusted ? 'any' : 'ensure');\n        if (renderer.renderModel &&\n            Private.currentPreferredMimetype.get(renderer) === mimeType &&\n            OutputArea.isIsolated(mimeType, model.metadata) ===\n                renderer instanceof Private.IsolatedRenderer) {\n            void renderer.renderModel(model);\n        }\n        else {\n            layout.widgets[index].dispose();\n            this._insertOutput(index, model);\n        }\n    }\n    /**\n     * Render and insert a single output into the layout.\n     *\n     * @param index - The index of the output to be inserted.\n     * @param model - The model of the output to be inserted.\n     */\n    _insertOutput(index, model) {\n        if (index === 0) {\n            this.trimmedOutputModels = new Array();\n        }\n        if (index === this.maxNumberOutputs && this.maxNumberOutputs !== 0) {\n            // TODO Improve style of the display message.\n            const separatorModel = this.model.contentFactory.createOutputModel({\n                value: {\n                    output_type: 'display_data',\n                    data: {\n                        'text/html': `\n              <a style=\"margin: 10px; text-decoration: none;\">\n                <pre>Output of this cell has been trimmed on the initial display.</pre>\n                <pre>Displaying the first ${this.maxNumberOutputs} top and last bottom outputs.</pre>\n                <pre>Click on this message to get the complete output.</pre>\n              </a>\n              `\n                    }\n                }\n            });\n            const onClick = () => this._showTrimmedOutputs(this.headTailNumberOutputs);\n            const separator = this.createOutputItem(separatorModel);\n            separator.node.addEventListener('click', onClick);\n            const layout = this.layout;\n            layout.insertWidget(this.headEndIndex, separator);\n        }\n        const output = this._createOutput(model);\n        const layout = this.layout;\n        if (index < this.maxNumberOutputs || this.maxNumberOutputs === 0) {\n            layout.insertWidget(index, output);\n        }\n        else if (index >= this.maxNumberOutputs) {\n            layout.removeWidgetAt(this.headTailNumberOutputs + 1);\n            layout.insertWidget(index, output);\n        }\n        if (index >= this.headTailNumberOutputs && this.maxNumberOutputs !== 0) {\n            this.trimmedOutputModels.push(model);\n        }\n        if (!this._outputTracker.has(output)) {\n            void this._outputTracker.add(output);\n        }\n    }\n    _createOutput(model) {\n        let output = this.createOutputItem(model);\n        if (output) {\n            output.toggleClass(EXECUTE_CLASS, model.executionCount !== null);\n        }\n        else {\n            output = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_5__.Widget();\n        }\n        return output;\n    }\n    /**\n     * A widget tracker for individual output widgets in the output area.\n     */\n    get outputTracker() {\n        return this._outputTracker;\n    }\n    /**\n     * Remove the information message related to the trimmed output\n     * and show all previously trimmed outputs.\n     */\n    _showTrimmedOutputs(headTailNumberOutputs) {\n        const layout = this.layout;\n        layout.removeWidgetAt(headTailNumberOutputs);\n        for (let i = 0; i < this.trimmedOutputModels.length - this.headTailNumberOutputs; i++) {\n            const output = this._createOutput(this.trimmedOutputModels[i]);\n            layout.insertWidget(headTailNumberOutputs + i, output);\n        }\n    }\n    /**\n     * Create an output item with a prompt and actual output\n     *\n     * @returns a rendered widget, or null if we cannot render\n     * #### Notes\n     */\n    createOutputItem(model) {\n        const output = this.createRenderedMimetype(model);\n        if (!output) {\n            return null;\n        }\n        const panel = new Private.OutputPanel();\n        panel.addClass(OUTPUT_AREA_ITEM_CLASS);\n        const prompt = this.contentFactory.createOutputPrompt();\n        prompt.executionCount = model.executionCount;\n        prompt.addClass(OUTPUT_AREA_PROMPT_CLASS);\n        panel.addWidget(prompt);\n        output.addClass(OUTPUT_AREA_OUTPUT_CLASS);\n        panel.addWidget(output);\n        return panel;\n    }\n    /**\n     * Render a mimetype\n     */\n    createRenderedMimetype(model) {\n        const mimeType = this.rendermime.preferredMimeType(model.data, model.trusted ? 'any' : 'ensure');\n        if (!mimeType) {\n            return null;\n        }\n        let output = this.rendermime.createRenderer(mimeType);\n        const isolated = OutputArea.isIsolated(mimeType, model.metadata);\n        if (isolated === true) {\n            output = new Private.IsolatedRenderer(output);\n        }\n        Private.currentPreferredMimetype.set(output, mimeType);\n        output.renderModel(model).catch(error => {\n            // Manually append error message to output\n            const pre = document.createElement('pre');\n            pre.textContent = `Javascript Error: ${error.message}`;\n            output.node.appendChild(pre);\n            // Remove mime-type-specific CSS classes\n            output.node.className = 'lm-Widget jp-RenderedText';\n            output.node.setAttribute('data-mime-type', 'application/vnd.jupyter.stderr');\n        });\n        return output;\n    }\n}\nclass SimplifiedOutputArea extends OutputArea {\n    /**\n     * Handle an input request from a kernel by doing nothing.\n     */\n    onInputRequest(msg, future) {\n        return;\n    }\n    /**\n     * Create an output item without a prompt, just the output widgets\n     */\n    createOutputItem(model) {\n        const output = this.createRenderedMimetype(model);\n        if (output) {\n            output.addClass(OUTPUT_AREA_OUTPUT_CLASS);\n        }\n        return output;\n    }\n}\n/**\n * A namespace for OutputArea statics.\n */\n(function (OutputArea) {\n    /**\n     * Execute code on an output area.\n     */\n    async function execute(code, output, sessionContext, metadata) {\n        var _a;\n        // Override the default for `stop_on_error`.\n        let stopOnError = true;\n        if (metadata &&\n            Array.isArray(metadata.tags) &&\n            metadata.tags.indexOf('raises-exception') !== -1) {\n            stopOnError = false;\n        }\n        const content = {\n            code,\n            stop_on_error: stopOnError\n        };\n        const kernel = (_a = sessionContext.session) === null || _a === void 0 ? void 0 : _a.kernel;\n        if (!kernel) {\n            throw new Error('Session has no kernel.');\n        }\n        const future = kernel.requestExecute(content, false, metadata);\n        output.future = future;\n        return future.done;\n    }\n    OutputArea.execute = execute;\n    function isIsolated(mimeType, metadata) {\n        const mimeMd = metadata[mimeType];\n        // mime-specific higher priority\n        if (mimeMd && mimeMd['isolated'] !== undefined) {\n            return !!mimeMd['isolated'];\n        }\n        else {\n            // fallback on global\n            return !!metadata['isolated'];\n        }\n    }\n    OutputArea.isIsolated = isIsolated;\n    /**\n     * The default implementation of `IContentFactory`.\n     */\n    class ContentFactory {\n        /**\n         * Create the output prompt for the widget.\n         */\n        createOutputPrompt() {\n            return new OutputPrompt();\n        }\n        /**\n         * Create an stdin widget.\n         */\n        createStdin(options) {\n            return new Stdin(options);\n        }\n    }\n    OutputArea.ContentFactory = ContentFactory;\n    /**\n     * The default `ContentFactory` instance.\n     */\n    OutputArea.defaultContentFactory = new ContentFactory();\n})(OutputArea || (OutputArea = {}));\n/**\n * The default output prompt implementation\n */\nclass OutputPrompt extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_5__.Widget {\n    /*\n     * Create an output prompt widget.\n     */\n    constructor() {\n        super();\n        this._executionCount = null;\n        this.addClass(OUTPUT_PROMPT_CLASS);\n    }\n    /**\n     * The execution count for the prompt.\n     */\n    get executionCount() {\n        return this._executionCount;\n    }\n    set executionCount(value) {\n        this._executionCount = value;\n        if (value === null) {\n            this.node.textContent = '';\n        }\n        else {\n            this.node.textContent = `[${value}]:`;\n        }\n    }\n}\n/**\n * The default stdin widget.\n */\nclass Stdin extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_5__.Widget {\n    /**\n     * Construct a new input widget.\n     */\n    constructor(options) {\n        super({\n            node: Private.createInputWidgetNode(options.prompt, options.password)\n        });\n        this._promise = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_2__.PromiseDelegate();\n        this.addClass(STDIN_CLASS);\n        this._input = this.node.getElementsByTagName('input')[0];\n        this._input.focus();\n        this._future = options.future;\n        this._value = options.prompt + ' ';\n    }\n    /**\n     * The value of the widget.\n     */\n    get value() {\n        return this._promise.promise.then(() => this._value);\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 dock panel's node. It should\n     * not be called directly by user code.\n     */\n    handleEvent(event) {\n        const input = this._input;\n        if (event.type === 'keydown') {\n            if (event.keyCode === 13) {\n                // Enter\n                this._future.sendInputReply({\n                    status: 'ok',\n                    value: input.value\n                });\n                if (input.type === 'password') {\n                    this._value += Array(input.value.length + 1).join('·');\n                }\n                else {\n                    this._value += input.value;\n                }\n                this._promise.resolve(void 0);\n            }\n        }\n    }\n    /**\n     * Handle `after-attach` messages sent to the widget.\n     */\n    onAfterAttach(msg) {\n        this._input.addEventListener('keydown', this);\n        this.update();\n    }\n    /**\n     * Handle `update-request` messages sent to the widget.\n     */\n    onUpdateRequest(msg) {\n        this._input.focus();\n    }\n    /**\n     * Handle `before-detach` messages sent to the widget.\n     */\n    onBeforeDetach(msg) {\n        this._input.removeEventListener('keydown', this);\n    }\n}\n/** ****************************************************************************\n * Private namespace\n ******************************************************************************/\n/**\n * A namespace for private data.\n */\nvar Private;\n(function (Private) {\n    /**\n     * Create the node for an InputWidget.\n     */\n    function createInputWidgetNode(prompt, password) {\n        const node = document.createElement('div');\n        const promptNode = document.createElement('pre');\n        promptNode.className = STDIN_PROMPT_CLASS;\n        promptNode.textContent = prompt;\n        const input = document.createElement('input');\n        input.className = STDIN_INPUT_CLASS;\n        if (password) {\n            input.type = 'password';\n        }\n        node.appendChild(promptNode);\n        promptNode.appendChild(input);\n        return node;\n    }\n    Private.createInputWidgetNode = createInputWidgetNode;\n    /**\n     * A renderer for IFrame data.\n     */\n    class IsolatedRenderer extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_5__.Widget {\n        /**\n         * Create an isolated renderer.\n         */\n        constructor(wrapped) {\n            super({ node: document.createElement('iframe') });\n            this.addClass('jp-mod-isolated');\n            this._wrapped = wrapped;\n            // Once the iframe is loaded, the subarea is dynamically inserted\n            const iframe = this.node;\n            iframe.frameBorder = '0';\n            iframe.scrolling = 'auto';\n            iframe.addEventListener('load', () => {\n                // Workaround needed by Firefox, to properly render svg inside\n                // iframes, see https://stackoverflow.com/questions/10177190/\n                // svg-dynamically-added-to-iframe-does-not-render-correctly\n                iframe.contentDocument.open();\n                // Insert the subarea into the iframe\n                // We must directly write the html. At this point, subarea doesn't\n                // contain any user content.\n                iframe.contentDocument.write(this._wrapped.node.innerHTML);\n                iframe.contentDocument.close();\n                const body = iframe.contentDocument.body;\n                // Adjust the iframe height automatically\n                iframe.style.height = `${body.scrollHeight}px`;\n                iframe.heightChangeObserver = new resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_6__.default(() => {\n                    iframe.style.height = `${body.scrollHeight}px`;\n                });\n                iframe.heightChangeObserver.observe(body);\n            });\n        }\n        /**\n         * Render a mime model.\n         *\n         * @param model - The mime model to render.\n         *\n         * @returns A promise which resolves when rendering is complete.\n         *\n         * #### Notes\n         * This method may be called multiple times during the lifetime\n         * of the widget to update it if and when new data is available.\n         */\n        renderModel(model) {\n            return this._wrapped.renderModel(model);\n        }\n    }\n    Private.IsolatedRenderer = IsolatedRenderer;\n    Private.currentPreferredMimetype = new _lumino_properties__WEBPACK_IMPORTED_MODULE_3__.AttachedProperty({\n        name: 'preferredMimetype',\n        create: owner => ''\n    });\n    /**\n     * A `Panel` that's focused by a `contextmenu` event.\n     */\n    class OutputPanel extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_5__.Panel {\n        /**\n         * Construct a new `OutputPanel` widget.\n         */\n        constructor(options) {\n            super(options);\n        }\n        /**\n         * A callback that focuses on the widget.\n         */\n        _onContext(_) {\n            this.node.focus();\n        }\n        /**\n         * Handle `after-attach` messages sent to the widget.\n         */\n        onAfterAttach(msg) {\n            super.onAfterAttach(msg);\n            this.node.addEventListener('contextmenu', this._onContext.bind(this));\n        }\n        /**\n         * Handle `before-detach` messages sent to the widget.\n         */\n        onBeforeDetach(msg) {\n            super.onAfterDetach(msg);\n            this.node.removeEventListener('contextmenu', this._onContext.bind(this));\n        }\n    }\n    Private.OutputPanel = OutputPanel;\n})(Private || (Private = {}));\n//# sourceMappingURL=widget.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/outputarea/lib/widget.js?");

/***/ })

}]);