"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_toc_lib_index_js"],{

/***/ "../node_modules/@jupyterlab/toc/lib/factory.js":
/*!******************************************************!*\
  !*** ../node_modules/@jupyterlab/toc/lib/factory.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 */   TableOfContentsFactory: () => (/* binding */ TableOfContentsFactory)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/coreutils */ \"webpack/sharing/consume/default/@jupyterlab/coreutils/@jupyterlab/coreutils\");\n/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n/**\n * Timeout for throttling ToC rendering following model changes.\n *\n * @private\n */\nconst RENDER_TIMEOUT = 1000;\n/**\n * Abstract table of contents model factory for IDocumentWidget.\n */\nclass TableOfContentsFactory {\n    /**\n     * Constructor\n     *\n     * @param tracker Widget tracker\n     */\n    constructor(tracker) {\n        this.tracker = tracker;\n    }\n    /**\n     * Whether the factory can handle the widget or not.\n     *\n     * @param widget - widget\n     * @returns boolean indicating a ToC can be generated\n     */\n    isApplicable(widget) {\n        if (!this.tracker.has(widget)) {\n            return false;\n        }\n        return true;\n    }\n    /**\n     * Create a new table of contents model for the widget\n     *\n     * @param widget - widget\n     * @param configuration - Table of contents configuration\n     * @returns The table of contents model\n     */\n    createNew(widget, configuration) {\n        const model = this._createNew(widget, configuration);\n        const context = widget.context;\n        const updateHeadings = () => {\n            model.refresh().catch(reason => {\n                console.error('Failed to update the table of contents.', reason);\n            });\n        };\n        const monitor = new _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.ActivityMonitor({\n            signal: context.model.contentChanged,\n            timeout: RENDER_TIMEOUT\n        });\n        monitor.activityStopped.connect(updateHeadings);\n        const updateTitle = () => {\n            model.title = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PathExt.basename(context.localPath);\n        };\n        context.pathChanged.connect(updateTitle);\n        context.ready\n            .then(() => {\n            updateTitle();\n            updateHeadings();\n        })\n            .catch(reason => {\n            console.error(`Failed to initiate headings for ${context.localPath}.`);\n        });\n        widget.disposed.connect(() => {\n            monitor.activityStopped.disconnect(updateHeadings);\n            context.pathChanged.disconnect(updateTitle);\n        });\n        return model;\n    }\n}\n//# sourceMappingURL=factory.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/toc/lib/factory.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/toc/lib/index.js":
/*!****************************************************!*\
  !*** ../node_modules/@jupyterlab/toc/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 */   ITableOfContentsRegistry: () => (/* reexport safe */ _tokens__WEBPACK_IMPORTED_MODULE_7__.ITableOfContentsRegistry),\n/* harmony export */   ITableOfContentsTracker: () => (/* reexport safe */ _tokens__WEBPACK_IMPORTED_MODULE_7__.ITableOfContentsTracker),\n/* harmony export */   TableOfContents: () => (/* reexport safe */ _tokens__WEBPACK_IMPORTED_MODULE_7__.TableOfContents),\n/* harmony export */   TableOfContentsFactory: () => (/* reexport safe */ _factory__WEBPACK_IMPORTED_MODULE_0__.TableOfContentsFactory),\n/* harmony export */   TableOfContentsItem: () => (/* reexport safe */ _tocitem__WEBPACK_IMPORTED_MODULE_5__.TableOfContentsItem),\n/* harmony export */   TableOfContentsModel: () => (/* reexport safe */ _model__WEBPACK_IMPORTED_MODULE_1__.TableOfContentsModel),\n/* harmony export */   TableOfContentsPanel: () => (/* reexport safe */ _panel__WEBPACK_IMPORTED_MODULE_2__.TableOfContentsPanel),\n/* harmony export */   TableOfContentsRegistry: () => (/* reexport safe */ _registry__WEBPACK_IMPORTED_MODULE_3__.TableOfContentsRegistry),\n/* harmony export */   TableOfContentsTracker: () => (/* reexport safe */ _tracker__WEBPACK_IMPORTED_MODULE_8__.TableOfContentsTracker),\n/* harmony export */   TableOfContentsTree: () => (/* reexport safe */ _toctree__WEBPACK_IMPORTED_MODULE_6__.TableOfContentsTree),\n/* harmony export */   TableOfContentsUtils: () => (/* reexport module object */ _utils__WEBPACK_IMPORTED_MODULE_9__),\n/* harmony export */   TableOfContentsWidget: () => (/* reexport safe */ _treeview__WEBPACK_IMPORTED_MODULE_4__.TableOfContentsWidget)\n/* harmony export */ });\n/* harmony import */ var _factory__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./factory */ \"../node_modules/@jupyterlab/toc/lib/factory.js\");\n/* harmony import */ var _model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./model */ \"../node_modules/@jupyterlab/toc/lib/model.js\");\n/* harmony import */ var _panel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./panel */ \"../node_modules/@jupyterlab/toc/lib/panel.js\");\n/* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./registry */ \"../node_modules/@jupyterlab/toc/lib/registry.js\");\n/* harmony import */ var _treeview__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./treeview */ \"../node_modules/@jupyterlab/toc/lib/treeview.js\");\n/* harmony import */ var _tocitem__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./tocitem */ \"../node_modules/@jupyterlab/toc/lib/tocitem.js\");\n/* harmony import */ var _toctree__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./toctree */ \"../node_modules/@jupyterlab/toc/lib/toctree.js\");\n/* harmony import */ var _tokens__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./tokens */ \"../node_modules/@jupyterlab/toc/lib/tokens.js\");\n/* harmony import */ var _tracker__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./tracker */ \"../node_modules/@jupyterlab/toc/lib/tracker.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils */ \"../node_modules/@jupyterlab/toc/lib/utils/index.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/**\n * @packageDocumentation\n * @module toc\n */\n\n\n\n\n\n\n\n\n\n// Namespace the utils\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/toc/lib/index.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/toc/lib/model.js":
/*!****************************************************!*\
  !*** ../node_modules/@jupyterlab/toc/lib/model.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 */   TableOfContentsModel: () => (/* binding */ TableOfContentsModel)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__ = __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_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @lumino/coreutils */ \"webpack/sharing/consume/default/@lumino/coreutils/@lumino/coreutils\");\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @lumino/signaling */ \"webpack/sharing/consume/default/@lumino/signaling/@lumino/signaling\");\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_lumino_signaling__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _tokens__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tokens */ \"../node_modules/@jupyterlab/toc/lib/tokens.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n\n\n/**\n * Abstract table of contents model.\n */\nclass TableOfContentsModel extends _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__.VDomModel {\n    /**\n     * Constructor\n     *\n     * @param widget The widget to search in\n     * @param configuration Default model configuration\n     */\n    constructor(widget, configuration) {\n        super();\n        this.widget = widget;\n        this._activeHeading = null;\n        this._activeHeadingChanged = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_2__.Signal(this);\n        this._collapseChanged = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_2__.Signal(this);\n        this._configuration = configuration !== null && configuration !== void 0 ? configuration : { ..._tokens__WEBPACK_IMPORTED_MODULE_3__.TableOfContents.defaultConfig };\n        this._headings = new Array();\n        this._headingsChanged = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_2__.Signal(this);\n        this._isActive = false;\n        this._isRefreshing = false;\n        this._needsRefreshing = false;\n    }\n    /**\n     * Current active entry.\n     *\n     * @returns table of contents active entry\n     */\n    get activeHeading() {\n        return this._activeHeading;\n    }\n    /**\n     * Signal emitted when the active heading changes.\n     */\n    get activeHeadingChanged() {\n        return this._activeHeadingChanged;\n    }\n    /**\n     * Signal emitted when a table of content section collapse state changes.\n     */\n    get collapseChanged() {\n        return this._collapseChanged;\n    }\n    /**\n     * Model configuration\n     */\n    get configuration() {\n        return this._configuration;\n    }\n    /**\n     * List of headings.\n     *\n     * @returns table of contents list of headings\n     */\n    get headings() {\n        return this._headings;\n    }\n    /**\n     * Signal emitted when the headings changes.\n     */\n    get headingsChanged() {\n        return this._headingsChanged;\n    }\n    /**\n     * Whether the model is active or not.\n     *\n     * #### Notes\n     * An active model means it is displayed in the table of contents.\n     * This can be used by subclass to limit updating the headings.\n     */\n    get isActive() {\n        return this._isActive;\n    }\n    set isActive(v) {\n        this._isActive = v;\n        // Refresh on activation expect if it is always active\n        //  => a ToC model is always active e.g. when displaying numbering in the document\n        if (this._isActive && !this.isAlwaysActive) {\n            this.refresh().catch(reason => {\n                console.error('Failed to refresh ToC model.', reason);\n            });\n        }\n    }\n    /**\n     * Whether the model gets updated even if the table of contents panel\n     * is hidden or not.\n     *\n     * #### Notes\n     * For example, ToC models use to add title numbering will\n     * set this to true.\n     */\n    get isAlwaysActive() {\n        return false;\n    }\n    /**\n     * List of configuration options supported by the model.\n     */\n    get supportedOptions() {\n        return ['maximalDepth'];\n    }\n    /**\n     * Document title\n     */\n    get title() {\n        return this._title;\n    }\n    set title(v) {\n        if (v !== this._title) {\n            this._title = v;\n            this.stateChanged.emit();\n        }\n    }\n    /**\n     * Refresh the headings list.\n     */\n    async refresh() {\n        if (this._isRefreshing) {\n            // Schedule a refresh if one is in progress\n            this._needsRefreshing = true;\n            return Promise.resolve();\n        }\n        this._isRefreshing = true;\n        try {\n            const newHeadings = await this.getHeadings();\n            if (this._needsRefreshing) {\n                this._needsRefreshing = false;\n                this._isRefreshing = false;\n                return this.refresh();\n            }\n            if (newHeadings && !this._areHeadingsEqual(newHeadings, this._headings)) {\n                this._headings = newHeadings;\n                this.stateChanged.emit();\n                this._headingsChanged.emit();\n            }\n        }\n        finally {\n            this._isRefreshing = false;\n        }\n    }\n    /**\n     * Set a new active heading.\n     *\n     * @param heading The new active heading\n     * @param emitSignal Whether to emit the activeHeadingChanged signal or not.\n     */\n    setActiveHeading(heading, emitSignal = true) {\n        if (this._activeHeading !== heading) {\n            this._activeHeading = heading;\n            this.stateChanged.emit();\n        }\n        if (emitSignal) {\n            // Always emit the signal to trigger a scroll even if the value did not change\n            this._activeHeadingChanged.emit(this._activeHeading);\n        }\n    }\n    /**\n     * Model configuration setter.\n     *\n     * @param c New configuration\n     */\n    setConfiguration(c) {\n        const newConfiguration = { ...this._configuration, ...c };\n        if (!_lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__.JSONExt.deepEqual(this._configuration, newConfiguration)) {\n            this._configuration = newConfiguration;\n            this.refresh().catch(reason => {\n                console.error('Failed to update the table of contents.', reason);\n            });\n        }\n    }\n    /**\n     * Callback on heading collapse.\n     *\n     * @param options.heading The heading to change state (all headings if not provided)\n     * @param options.collapsed The new collapsed status (toggle existing status if not provided)\n     */\n    toggleCollapse(options) {\n        var _a, _b;\n        if (options.heading) {\n            options.heading.collapsed =\n                (_a = options.collapsed) !== null && _a !== void 0 ? _a : !options.heading.collapsed;\n            this.stateChanged.emit();\n            this._collapseChanged.emit(options.heading);\n        }\n        else {\n            // Use the provided state or collapsed all except if all are collapsed\n            const newState = (_b = options.collapsed) !== null && _b !== void 0 ? _b : !this.headings.some(h => { var _a; return !((_a = h.collapsed) !== null && _a !== void 0 ? _a : false); });\n            this.headings.forEach(h => (h.collapsed = newState));\n            this.stateChanged.emit();\n            this._collapseChanged.emit(null);\n        }\n    }\n    /**\n     * Test if two headings are equal or not.\n     *\n     * @param heading1 First heading\n     * @param heading2 Second heading\n     * @returns Whether the headings are equal.\n     */\n    isHeadingEqual(heading1, heading2) {\n        return (heading1.level === heading2.level &&\n            heading1.text === heading2.text &&\n            heading1.prefix === heading2.prefix);\n    }\n    /**\n     * Test if two list of headings are equal or not.\n     *\n     * @param headings1 First list of headings\n     * @param headings2 Second list of headings\n     * @returns Whether the array are equal.\n     */\n    _areHeadingsEqual(headings1, headings2) {\n        if (headings1.length === headings2.length) {\n            for (let i = 0; i < headings1.length; i++) {\n                if (!this.isHeadingEqual(headings1[i], headings2[i])) {\n                    return false;\n                }\n            }\n            return true;\n        }\n        return false;\n    }\n}\n//# sourceMappingURL=model.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/toc/lib/model.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/toc/lib/panel.js":
/*!****************************************************!*\
  !*** ../node_modules/@jupyterlab/toc/lib/panel.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 */   TableOfContentsPanel: () => (/* binding */ TableOfContentsPanel)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__ = __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_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @lumino/widgets */ \"webpack/sharing/consume/default/@lumino/widgets/@lumino/widgets\");\n/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_lumino_widgets__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _treeview__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./treeview */ \"../node_modules/@jupyterlab/toc/lib/treeview.js\");\n/*\n * Copyright (c) Jupyter Development Team.\n * Distributed under the terms of the Modified BSD License.\n */\n\n\n\n/**\n * Table of contents sidebar panel.\n */\nclass TableOfContentsPanel extends _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__.SidePanel {\n    /**\n     * Constructor\n     *\n     * @param translator - Translator tool\n     */\n    constructor(translator) {\n        super({ content: new _lumino_widgets__WEBPACK_IMPORTED_MODULE_1__.Panel(), translator });\n        this._model = null;\n        this.addClass('jp-TableOfContents');\n        this._title = new Private.Header(this._trans.__('Table of Contents'));\n        this.header.addWidget(this._title);\n        this._treeview = new _treeview__WEBPACK_IMPORTED_MODULE_2__.TableOfContentsWidget({\n            placeholderHeadline: this._trans.__('No Headings'),\n            placeholderText: this._trans.__('The table of contents shows headings in notebooks and supported files.')\n        });\n        this._treeview.addClass('jp-TableOfContents-tree');\n        this.content.addWidget(this._treeview);\n    }\n    /**\n     * Get the current model.\n     */\n    get model() {\n        return this._model;\n    }\n    set model(newValue) {\n        var _a, _b;\n        if (this._model !== newValue) {\n            (_a = this._model) === null || _a === void 0 ? void 0 : _a.stateChanged.disconnect(this._onTitleChanged, this);\n            this._model = newValue;\n            if (this._model) {\n                this._model.isActive = this.isVisible;\n            }\n            (_b = this._model) === null || _b === void 0 ? void 0 : _b.stateChanged.connect(this._onTitleChanged, this);\n            this._onTitleChanged();\n            this._treeview.model = this._model;\n        }\n    }\n    onAfterHide(msg) {\n        super.onAfterHide(msg);\n        if (this._model) {\n            this._model.isActive = false;\n        }\n    }\n    onBeforeShow(msg) {\n        super.onBeforeShow(msg);\n        if (this._model) {\n            this._model.isActive = true;\n        }\n    }\n    _onTitleChanged() {\n        var _a, _b;\n        this._title.setTitle((_b = (_a = this._model) === null || _a === void 0 ? void 0 : _a.title) !== null && _b !== void 0 ? _b : this._trans.__('Table of Contents'));\n    }\n}\n/**\n * Private helpers namespace\n */\nvar Private;\n(function (Private) {\n    /**\n     * Panel header\n     */\n    class Header extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_1__.Widget {\n        /**\n         * Constructor\n         *\n         * @param title - Title text\n         */\n        constructor(title) {\n            const node = document.createElement('h2');\n            node.textContent = title;\n            node.classList.add('jp-text-truncated');\n            super({ node });\n            this._title = node;\n        }\n        /**\n         * Set the header title.\n         */\n        setTitle(title) {\n            this._title.textContent = title;\n        }\n    }\n    Private.Header = Header;\n})(Private || (Private = {}));\n//# sourceMappingURL=panel.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/toc/lib/panel.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/toc/lib/registry.js":
/*!*******************************************************!*\
  !*** ../node_modules/@jupyterlab/toc/lib/registry.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 */   TableOfContentsRegistry: () => (/* binding */ TableOfContentsRegistry)\n/* harmony export */ });\n/* harmony import */ var _lumino_disposable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @lumino/disposable */ \"webpack/sharing/consume/default/@lumino/disposable/@lumino/disposable\");\n/* harmony import */ var _lumino_disposable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_lumino_disposable__WEBPACK_IMPORTED_MODULE_0__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n/**\n * Class for registering table of contents generators.\n */\nclass TableOfContentsRegistry {\n    constructor() {\n        this._generators = new Map();\n        this._idCounter = 0;\n    }\n    /**\n     * Finds a table of contents model for a widget.\n     *\n     * ## Notes\n     *\n     * -   If unable to find a table of contents model, the method return `undefined`.\n     *\n     * @param widget - widget\n     * @param configuration - Default model configuration\n     * @returns Table of contents model\n     */\n    getModel(widget, configuration) {\n        for (const generator of this._generators.values()) {\n            if (generator.isApplicable(widget)) {\n                return generator.createNew(widget, configuration);\n            }\n        }\n    }\n    /**\n     * Adds a table of contents generator to the registry.\n     *\n     * @param generator - table of contents generator\n     */\n    add(generator) {\n        const id = this._idCounter++;\n        this._generators.set(id, generator);\n        return new _lumino_disposable__WEBPACK_IMPORTED_MODULE_0__.DisposableDelegate(() => {\n            this._generators.delete(id);\n        });\n    }\n}\n//# sourceMappingURL=registry.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/toc/lib/registry.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/toc/lib/tocitem.js":
/*!******************************************************!*\
  !*** ../node_modules/@jupyterlab/toc/lib/tocitem.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 */   TableOfContentsItem: () => (/* binding */ TableOfContentsItem)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__ = __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_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"webpack/sharing/consume/default/react/react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n/**\n * React component for a table of contents entry.\n */\nclass TableOfContentsItem extends react__WEBPACK_IMPORTED_MODULE_1__.PureComponent {\n    /**\n     * Renders a table of contents entry.\n     *\n     * @returns rendered entry\n     */\n    render() {\n        const { children, isActive, heading, onCollapse, onMouseDown } = this.props;\n        return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"li\", { className: \"jp-tocItem\" },\n            react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { className: `jp-tocItem-heading ${isActive ? 'jp-tocItem-active' : ''}`, onMouseDown: (event) => {\n                    // React only on deepest item\n                    if (!event.defaultPrevented) {\n                        event.preventDefault();\n                        onMouseDown(heading);\n                    }\n                } },\n                react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"button\", { className: \"jp-tocItem-collapser\", onClick: (event) => {\n                        event.preventDefault();\n                        onCollapse(heading);\n                    }, style: { visibility: children ? 'visible' : 'hidden' } }, heading.collapsed ? (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__.caretRightIcon.react, { tag: \"span\", width: \"20px\" })) : (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__.caretDownIcon.react, { tag: \"span\", width: \"20px\" }))),\n                react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"span\", { className: \"jp-tocItem-content\", title: heading.text, ...heading.dataset },\n                    heading.prefix,\n                    heading.text)),\n            children && !heading.collapsed && react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"ol\", null, children)));\n    }\n}\n//# sourceMappingURL=tocitem.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/toc/lib/tocitem.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/toc/lib/toctree.js":
/*!******************************************************!*\
  !*** ../node_modules/@jupyterlab/toc/lib/toctree.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 */   TableOfContentsTree: () => (/* binding */ TableOfContentsTree)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"webpack/sharing/consume/default/react/react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _tocitem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./tocitem */ \"../node_modules/@jupyterlab/toc/lib/tocitem.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n/**\n * React component for a table of contents tree.\n */\nclass TableOfContentsTree extends react__WEBPACK_IMPORTED_MODULE_0__.PureComponent {\n    /**\n     * Renders a table of contents tree.\n     */\n    render() {\n        const { documentType } = this.props;\n        return (react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"ol\", { className: \"jp-TableOfContents-content\", 'data-document-type': documentType }, this.buildTree()));\n    }\n    /**\n     * Convert the flat headings list to a nested tree list\n     */\n    buildTree() {\n        if (this.props.headings.length === 0) {\n            return [];\n        }\n        const buildOneTree = (currentIndex) => {\n            const items = this.props.headings;\n            const children = new Array();\n            const current = items[currentIndex];\n            let nextCandidateIndex = currentIndex + 1;\n            while (nextCandidateIndex < items.length) {\n                const candidateItem = items[nextCandidateIndex];\n                if (candidateItem.level <= current.level) {\n                    break;\n                }\n                const [child, nextIndex] = buildOneTree(nextCandidateIndex);\n                children.push(child);\n                nextCandidateIndex = nextIndex;\n            }\n            const currentTree = (react__WEBPACK_IMPORTED_MODULE_0__.createElement(_tocitem__WEBPACK_IMPORTED_MODULE_1__.TableOfContentsItem, { key: `${current.level}-${currentIndex}-${current.text}`, isActive: !!this.props.activeHeading && current === this.props.activeHeading, heading: current, onMouseDown: this.props.setActiveHeading, onCollapse: this.props.onCollapseChange }, children.length ? children : null));\n            return [currentTree, nextCandidateIndex];\n        };\n        const trees = new Array();\n        let currentIndex = 0;\n        while (currentIndex < this.props.headings.length) {\n            const [tree, nextIndex] = buildOneTree(currentIndex);\n            trees.push(tree);\n            currentIndex = nextIndex;\n        }\n        return trees;\n    }\n}\n//# sourceMappingURL=toctree.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/toc/lib/toctree.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/toc/lib/tokens.js":
/*!*****************************************************!*\
  !*** ../node_modules/@jupyterlab/toc/lib/tokens.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 */   ITableOfContentsRegistry: () => (/* binding */ ITableOfContentsRegistry),\n/* harmony export */   ITableOfContentsTracker: () => (/* binding */ ITableOfContentsTracker),\n/* harmony export */   TableOfContents: () => (/* binding */ TableOfContents)\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/**\n * Table of contents registry token.\n */\nconst ITableOfContentsRegistry = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__.Token('@jupyterlab/toc:ITableOfContentsRegistry', 'A service to register table of content factory.');\n/**\n * Table of contents tracker token.\n */\nconst ITableOfContentsTracker = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__.Token('@jupyterlab/toc:ITableOfContentsTracker', 'A widget tracker for table of contents.');\n/**\n * Namespace for table of contents interface\n */\nvar TableOfContents;\n(function (TableOfContents) {\n    /**\n     * Default table of content configuration\n     */\n    TableOfContents.defaultConfig = {\n        baseNumbering: 1,\n        maximalDepth: 4,\n        numberingH1: true,\n        numberHeaders: false,\n        includeOutput: true,\n        syncCollapseState: false\n    };\n})(TableOfContents || (TableOfContents = {}));\n//# sourceMappingURL=tokens.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/toc/lib/tokens.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/toc/lib/tracker.js":
/*!******************************************************!*\
  !*** ../node_modules/@jupyterlab/toc/lib/tracker.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 */   TableOfContentsTracker: () => (/* binding */ TableOfContentsTracker)\n/* harmony export */ });\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/**\n * Table of contents tracker\n */\nclass TableOfContentsTracker {\n    /**\n     * Constructor\n     */\n    constructor() {\n        this.modelMapping = new WeakMap();\n    }\n    /**\n     * Track a given model.\n     *\n     * @param widget Widget\n     * @param model Table of contents model\n     */\n    add(widget, model) {\n        this.modelMapping.set(widget, model);\n    }\n    /**\n     * Get the table of contents model associated with a given widget.\n     *\n     * @param widget Widget\n     * @returns The table of contents model\n     */\n    get(widget) {\n        const model = this.modelMapping.get(widget);\n        return !model || model.isDisposed ? null : model;\n    }\n}\n//# sourceMappingURL=tracker.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/toc/lib/tracker.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/toc/lib/treeview.js":
/*!*******************************************************!*\
  !*** ../node_modules/@jupyterlab/toc/lib/treeview.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 */   TableOfContentsWidget: () => (/* binding */ TableOfContentsWidget)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__ = __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_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"webpack/sharing/consume/default/react/react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _toctree__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./toctree */ \"../node_modules/@jupyterlab/toc/lib/toctree.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n\n/**\n * Table of contents widget.\n */\nclass TableOfContentsWidget extends _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__.VDomRenderer {\n    /**\n     * Constructor\n     *\n     * @param options Widget options\n     */\n    constructor(options) {\n        super(options.model);\n        this._placeholderHeadline = options.placeholderHeadline;\n        this._placeholderText = options.placeholderText;\n    }\n    /**\n     * Render the content of this widget using the virtual DOM.\n     *\n     * This method will be called anytime the widget needs to be rendered, which\n     * includes layout triggered rendering.\n     */\n    render() {\n        if (!this.model || this.model.headings.length === 0) {\n            return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { className: \"jp-TableOfContents-placeholder\" },\n                react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { className: \"jp-TableOfContents-placeholderContent\" },\n                    react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"h3\", null, this._placeholderHeadline),\n                    react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"p\", null, this._placeholderText))));\n        }\n        return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_toctree__WEBPACK_IMPORTED_MODULE_2__.TableOfContentsTree, { activeHeading: this.model.activeHeading, documentType: this.model.documentType, headings: this.model.headings, onCollapseChange: (heading) => {\n                this.model.toggleCollapse({ heading });\n            }, setActiveHeading: (heading) => {\n                this.model.setActiveHeading(heading);\n            } }));\n    }\n}\n//# sourceMappingURL=treeview.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/toc/lib/treeview.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/toc/lib/utils/common.js":
/*!***********************************************************!*\
  !*** ../node_modules/@jupyterlab/toc/lib/utils/common.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 */   NUMBERING_CLASS: () => (/* binding */ NUMBERING_CLASS),\n/* harmony export */   addPrefix: () => (/* binding */ addPrefix),\n/* harmony export */   clearNumbering: () => (/* binding */ clearNumbering),\n/* harmony export */   filterHeadings: () => (/* binding */ filterHeadings),\n/* harmony export */   getHTMLHeadings: () => (/* binding */ getHTMLHeadings),\n/* harmony export */   getPrefix: () => (/* binding */ getPrefix),\n/* harmony export */   isHTML: () => (/* binding */ isHTML)\n/* harmony export */ });\n/* harmony import */ var _tokens__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../tokens */ \"../node_modules/@jupyterlab/toc/lib/tokens.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n/**\n * Class used to mark numbering prefix for headings in a document.\n */\nconst NUMBERING_CLASS = 'numbering-entry';\n/**\n * Filter headings for table of contents and compute associated prefix\n *\n * @param headings Headings to process\n * @param options Options\n * @param initialLevels Initial levels for prefix computation\n * @returns Extracted headings\n */\nfunction filterHeadings(headings, options, initialLevels = []) {\n    const config = {\n        ..._tokens__WEBPACK_IMPORTED_MODULE_0__.TableOfContents.defaultConfig,\n        ...options\n    };\n    const levels = initialLevels;\n    let previousLevel = levels.length;\n    const filteredHeadings = new Array();\n    for (const heading of headings) {\n        if (heading.skip) {\n            continue;\n        }\n        const level = heading.level;\n        if (level > 0 && level <= config.maximalDepth) {\n            const prefix = getPrefix(level, previousLevel, levels, config);\n            previousLevel = level;\n            filteredHeadings.push({\n                ...heading,\n                prefix\n            });\n        }\n    }\n    return filteredHeadings;\n}\n/**\n * Returns whether a MIME type corresponds to either HTML.\n *\n * @param mime - MIME type string\n * @returns boolean indicating whether a provided MIME type corresponds to either HTML\n *\n * @example\n * const bool = isHTML('text/html');\n * // returns true\n *\n * @example\n * const bool = isHTML('text/plain');\n * // returns false\n */\nfunction isHTML(mime) {\n    return mime === 'text/html';\n}\n/**\n * Parse a HTML string for headings.\n *\n * ### Notes\n * The html string is not sanitized - use with caution\n *\n * @param html HTML string to parse\n * @param force Whether to ignore HTML headings with class jp-toc-ignore and tocSkip or not\n * @returns Extracted headings\n */\nfunction getHTMLHeadings(html, force = true) {\n    var _a;\n    const container = document.createElement('div');\n    container.innerHTML = html;\n    const headings = new Array();\n    const headers = container.querySelectorAll('h1, h2, h3, h4, h5, h6');\n    for (const h of headers) {\n        const level = parseInt(h.tagName[1], 10);\n        headings.push({\n            text: (_a = h.textContent) !== null && _a !== void 0 ? _a : '',\n            level,\n            id: h === null || h === void 0 ? void 0 : h.getAttribute('id'),\n            skip: h.classList.contains('jp-toc-ignore') || h.classList.contains('tocSkip')\n        });\n    }\n    return headings;\n}\n/**\n * Add an heading prefix to a HTML node.\n *\n * @param container HTML node containing the heading\n * @param selector Heading selector\n * @param prefix Title prefix to add\n * @returns The modified HTML element\n */\nfunction addPrefix(container, selector, prefix) {\n    let element = container.querySelector(selector);\n    if (!element) {\n        return null;\n    }\n    if (!element.querySelector(`span.${NUMBERING_CLASS}`)) {\n        addNumbering(element, prefix);\n    }\n    else {\n        // There are likely multiple elements with the same selector\n        //  => use the first one without prefix\n        const allElements = container.querySelectorAll(selector);\n        for (const el of allElements) {\n            if (!el.querySelector(`span.${NUMBERING_CLASS}`)) {\n                element = el;\n                addNumbering(el, prefix);\n                break;\n            }\n        }\n    }\n    return element;\n}\n/**\n * Update the levels and create the numbering prefix\n *\n * @param level Current level\n * @param previousLevel Previous level\n * @param levels Levels list\n * @param options Options\n * @returns The numbering prefix\n */\nfunction getPrefix(level, previousLevel, levels, options) {\n    const { baseNumbering, numberingH1, numberHeaders } = options;\n    let prefix = '';\n    if (numberHeaders) {\n        const highestLevel = numberingH1 ? 1 : 2;\n        if (level > previousLevel) {\n            // Initialize the new levels\n            for (let l = previousLevel; l < level - 1; l++) {\n                levels[l] = 0;\n            }\n            levels[level - 1] = level === highestLevel ? baseNumbering : 1;\n        }\n        else {\n            // Increment the current level\n            levels[level - 1] += 1;\n            // Drop higher levels\n            if (level < previousLevel) {\n                levels.splice(level);\n            }\n        }\n        // If the header list skips some level, replace missing elements by 0\n        if (numberingH1) {\n            prefix = levels.map(level => level !== null && level !== void 0 ? level : 0).join('.') + '. ';\n        }\n        else {\n            if (levels.length > 1) {\n                prefix =\n                    levels\n                        .slice(1)\n                        .map(level => level !== null && level !== void 0 ? level : 0)\n                        .join('.') + '. ';\n            }\n        }\n    }\n    return prefix;\n}\n/**\n * Add a numbering prefix to a HTML element.\n *\n * @param el HTML element\n * @param numbering Numbering prefix to add\n */\nfunction addNumbering(el, numbering) {\n    el.insertAdjacentHTML('afterbegin', `<span class=\"${NUMBERING_CLASS}\">${numbering}</span>`);\n}\n/**\n * Remove all numbering nodes from element\n * @param element Node to clear\n */\nfunction clearNumbering(element) {\n    element === null || element === void 0 ? void 0 : element.querySelectorAll(`span.${NUMBERING_CLASS}`).forEach(el => {\n        el.remove();\n    });\n}\n//# sourceMappingURL=common.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/toc/lib/utils/common.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/toc/lib/utils/index.js":
/*!**********************************************************!*\
  !*** ../node_modules/@jupyterlab/toc/lib/utils/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 */   Markdown: () => (/* reexport module object */ _markdown__WEBPACK_IMPORTED_MODULE_1__),\n/* harmony export */   NUMBERING_CLASS: () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.NUMBERING_CLASS),\n/* harmony export */   addPrefix: () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.addPrefix),\n/* harmony export */   clearNumbering: () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.clearNumbering),\n/* harmony export */   filterHeadings: () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.filterHeadings),\n/* harmony export */   getHTMLHeadings: () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.getHTMLHeadings),\n/* harmony export */   getPrefix: () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.getPrefix),\n/* harmony export */   isHTML: () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.isHTML)\n/* harmony export */ });\n/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common */ \"../node_modules/@jupyterlab/toc/lib/utils/common.js\");\n/* harmony import */ var _markdown__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./markdown */ \"../node_modules/@jupyterlab/toc/lib/utils/markdown.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/toc/lib/utils/index.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/toc/lib/utils/markdown.js":
/*!*************************************************************!*\
  !*** ../node_modules/@jupyterlab/toc/lib/utils/markdown.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 */   getHeadingId: () => (/* binding */ getHeadingId),\n/* harmony export */   getHeadings: () => (/* binding */ getHeadings),\n/* harmony export */   isMarkdown: () => (/* binding */ isMarkdown)\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_rendermime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/rendermime */ \"webpack/sharing/consume/default/@jupyterlab/rendermime/@jupyterlab/rendermime\");\n/* harmony import */ var _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_1__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n/**\n * Build the heading html id.\n *\n * @param raw Raw markdown heading\n * @param level Heading level\n * @param sanitizer HTML sanitizer\n */\nasync function getHeadingId(markdownParser, raw, level, sanitizer) {\n    try {\n        const host = document.createElement('div');\n        await (0,_jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_1__.renderMarkdown)({\n            markdownParser,\n            host,\n            source: raw,\n            trusted: false,\n            sanitizer: sanitizer !== null && sanitizer !== void 0 ? sanitizer : new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Sanitizer(),\n            shouldTypeset: false,\n            resolver: null,\n            linkHandler: null,\n            latexTypesetter: null\n        });\n        const header = host.querySelector(`h${level}`);\n        if (!header) {\n            return null;\n        }\n        return header.id;\n    }\n    catch (reason) {\n        console.error('Failed to parse a heading.', reason);\n    }\n    return null;\n}\n/**\n * Parses the provided string and returns a list of headings.\n *\n * @param text - Input text\n * @returns List of headings\n */\nfunction getHeadings(text) {\n    // Split the text into lines:\n    const lines = text.split('\\n');\n    // Iterate over the lines to get the header level and text for each line:\n    const headings = new Array();\n    let isCodeBlock;\n    let lineIdx = 0;\n    // Don't check for Markdown headings if in a YAML frontmatter block.\n    // We can only start a frontmatter block on the first line of the file.\n    // At other positions in a markdown file, '---' represents a horizontal rule.\n    if (lines[lineIdx] === '---') {\n        // Search for another '---' and treat that as the end of the frontmatter.\n        // If we don't find one, treat the file as containing no frontmatter.\n        for (let frontmatterEndLineIdx = lineIdx + 1; frontmatterEndLineIdx < lines.length; frontmatterEndLineIdx++) {\n            if (lines[frontmatterEndLineIdx] === '---') {\n                lineIdx = frontmatterEndLineIdx + 1;\n                break;\n            }\n        }\n    }\n    for (; lineIdx < lines.length; lineIdx++) {\n        const line = lines[lineIdx];\n        if (line === '') {\n            // Bail early\n            continue;\n        }\n        // Don't check for Markdown headings if in a code block\n        if (line.startsWith('```')) {\n            isCodeBlock = !isCodeBlock;\n        }\n        if (isCodeBlock) {\n            continue;\n        }\n        const heading = parseHeading(line, lines[lineIdx + 1]); // append the next line to capture alternative style Markdown headings\n        if (heading) {\n            headings.push({\n                ...heading,\n                line: lineIdx\n            });\n        }\n    }\n    return headings;\n}\nconst MARKDOWN_MIME_TYPE = [\n    'text/x-ipythongfm',\n    'text/x-markdown',\n    'text/x-gfm',\n    'text/markdown'\n];\n/**\n * Returns whether a MIME type corresponds to a Markdown flavor.\n *\n * @param mime - MIME type string\n * @returns boolean indicating whether a provided MIME type corresponds to a Markdown flavor\n *\n * @example\n * const bool = isMarkdown('text/markdown');\n * // returns true\n *\n * @example\n * const bool = isMarkdown('text/plain');\n * // returns false\n */\nfunction isMarkdown(mime) {\n    return MARKDOWN_MIME_TYPE.includes(mime);\n}\n/**\n * Parses a heading, if one exists, from a provided string.\n *\n * ## Notes\n *\n * -   Heading examples:\n *\n *     -   Markdown heading:\n *\n *         ```\n *         # Foo\n *         ```\n *\n *     -   Markdown heading (alternative style):\n *\n *         ```\n *         Foo\n *         ===\n *         ```\n *\n *         ```\n *         Foo\n *         ---\n *         ```\n *\n *     -   HTML heading:\n *\n *         ```\n *         <h3>Foo</h3>\n *         ```\n *\n * @private\n * @param line - Line to parse\n * @param nextLine - The line after the one to parse\n * @returns heading info\n *\n * @example\n * const out = parseHeading('### Foo\\n');\n * // returns {'text': 'Foo', 'level': 3}\n *\n * @example\n * const out = parseHeading('Foo\\n===\\n');\n * // returns {'text': 'Foo', 'level': 1}\n *\n * @example\n * const out = parseHeading('<h4>Foo</h4>\\n');\n * // returns {'text': 'Foo', 'level': 4}\n *\n * @example\n * const out = parseHeading('Foo');\n * // returns null\n */\nfunction parseHeading(line, nextLine) {\n    // Case: Markdown heading\n    let match = line.match(/^([#]{1,6}) (.*)/);\n    if (match) {\n        return {\n            text: cleanTitle(match[2]),\n            level: match[1].length,\n            raw: line,\n            skip: skipHeading.test(match[0])\n        };\n    }\n    // Case: Markdown heading (alternative style)\n    if (nextLine) {\n        match = nextLine.match(/^ {0,3}([=]{2,}|[-]{2,})\\s*$/);\n        if (match) {\n            return {\n                text: cleanTitle(line),\n                level: match[1][0] === '=' ? 1 : 2,\n                raw: [line, nextLine].join('\\n'),\n                skip: skipHeading.test(line)\n            };\n        }\n    }\n    // Case: HTML heading (WARNING: this is not particularly robust, as HTML headings can span multiple lines)\n    match = line.match(/<h([1-6]).*>(.*)<\\/h\\1>/i);\n    if (match) {\n        return {\n            text: match[2],\n            level: parseInt(match[1], 10),\n            skip: skipHeading.test(match[0]),\n            raw: line\n        };\n    }\n    return null;\n}\nfunction cleanTitle(heading) {\n    // take special care to parse Markdown links into raw text\n    return heading.replace(/\\[(.+)\\]\\(.+\\)/g, '$1');\n}\n/**\n * Ignore title with html tag with a class name equal to `jp-toc-ignore` or `tocSkip`\n */\nconst skipHeading = /<\\w+\\s(.*?\\s)?class=\"(.*?\\s)?(jp-toc-ignore|tocSkip)(\\s.*?)?\"(\\s.*?)?>/;\n//# sourceMappingURL=markdown.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/toc/lib/utils/markdown.js?");

/***/ })

}]);