"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([["node_modules_jupyterlab_completer-extension_lib_index_js"],{

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

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_completer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/completer */ \"webpack/sharing/consume/default/@jupyterlab/completer/@jupyterlab/completer\");\n/* harmony import */ var _jupyterlab_completer__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_completer__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/settingregistry */ \"webpack/sharing/consume/default/@jupyterlab/settingregistry/@jupyterlab/settingregistry\");\n/* harmony import */ var _jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyterlab/ui-components */ \"webpack/sharing/consume/default/@jupyterlab/ui-components/@jupyterlab/ui-components\");\n/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _renderer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./renderer */ \"../node_modules/@jupyterlab/completer-extension/lib/renderer.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/**\n * @packageDocumentation\n * @module completer-extension\n */\n\n\n\n\nconst COMPLETION_MANAGER_PLUGIN = '@jupyterlab/completer-extension:manager';\nconst defaultProvider = {\n    id: '@jupyterlab/completer-extension:base-service',\n    description: 'Adds context and kernel completion providers.',\n    requires: [_jupyterlab_completer__WEBPACK_IMPORTED_MODULE_0__.ICompletionProviderManager],\n    autoStart: true,\n    activate: (app, completionManager) => {\n        completionManager.registerProvider(new _jupyterlab_completer__WEBPACK_IMPORTED_MODULE_0__.ContextCompleterProvider());\n        completionManager.registerProvider(new _jupyterlab_completer__WEBPACK_IMPORTED_MODULE_0__.KernelCompleterProvider());\n    }\n};\nconst manager = {\n    id: COMPLETION_MANAGER_PLUGIN,\n    description: 'Provides the completion provider manager.',\n    requires: [_jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_1__.ISettingRegistry],\n    optional: [_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.IFormRendererRegistry],\n    provides: _jupyterlab_completer__WEBPACK_IMPORTED_MODULE_0__.ICompletionProviderManager,\n    autoStart: true,\n    activate: (app, settings, editorRegistry) => {\n        const AVAILABLE_PROVIDERS = 'availableProviders';\n        const PROVIDER_TIMEOUT = 'providerTimeout';\n        const SHOW_DOCUMENT_PANEL = 'showDocumentationPanel';\n        const CONTINUOUS_HINTING = 'autoCompletion';\n        const manager = new _jupyterlab_completer__WEBPACK_IMPORTED_MODULE_0__.CompletionProviderManager();\n        const updateSetting = (settingValues, availableProviders) => {\n            var _a;\n            const providersData = settingValues.get(AVAILABLE_PROVIDERS);\n            const timeout = settingValues.get(PROVIDER_TIMEOUT);\n            const showDoc = settingValues.get(SHOW_DOCUMENT_PANEL);\n            const continuousHinting = settingValues.get(CONTINUOUS_HINTING);\n            manager.setTimeout(timeout.composite);\n            manager.setShowDocumentationPanel(showDoc.composite);\n            manager.setContinuousHinting(continuousHinting.composite);\n            const selectedProviders = (_a = providersData.user) !== null && _a !== void 0 ? _a : providersData.composite;\n            const sortedProviders = Object.entries(selectedProviders !== null && selectedProviders !== void 0 ? selectedProviders : {})\n                .filter(val => val[1] >= 0 && availableProviders.includes(val[0]))\n                .sort(([, rank1], [, rank2]) => rank2 - rank1)\n                .map(item => item[0]);\n            manager.activateProvider(sortedProviders);\n        };\n        app.restored\n            .then(() => {\n            const availableProviders = [...manager.getProviders().keys()];\n            settings.transform(COMPLETION_MANAGER_PLUGIN, {\n                fetch: plugin => {\n                    const schema = plugin.schema.properties;\n                    const defaultValue = {};\n                    availableProviders.forEach((item, index) => {\n                        defaultValue[item] = (index + 1) * 100;\n                    });\n                    schema[AVAILABLE_PROVIDERS]['default'] = defaultValue;\n                    return plugin;\n                }\n            });\n            const settingsPromise = settings.load(COMPLETION_MANAGER_PLUGIN);\n            settingsPromise\n                .then(settingValues => {\n                updateSetting(settingValues, availableProviders);\n                settingValues.changed.connect(newSettings => {\n                    updateSetting(newSettings, availableProviders);\n                });\n            })\n                .catch(console.error);\n        })\n            .catch(console.error);\n        if (editorRegistry) {\n            const renderer = {\n                fieldRenderer: (props) => {\n                    return (0,_renderer__WEBPACK_IMPORTED_MODULE_3__.renderAvailableProviders)(props);\n                }\n            };\n            editorRegistry.addRenderer(`${COMPLETION_MANAGER_PLUGIN}.availableProviders`, renderer);\n        }\n        return manager;\n    }\n};\n/**\n * Export the plugins as default.\n */\nconst plugins = [manager, defaultProvider];\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (plugins);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/completer-extension/lib/index.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/completer-extension/lib/renderer.js":
/*!***********************************************************************!*\
  !*** ../node_modules/@jupyterlab/completer-extension/lib/renderer.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 */   \"renderAvailableProviders\": () => (/* binding */ renderAvailableProviders)\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/*\n * Copyright (c) Jupyter Development Team.\n * Distributed under the terms of the Modified BSD License.\n */\n\nconst AVAILABLE_PROVIDERS = 'availableProviders';\n/**\n * Custom setting renderer for provider rank.\n */\nfunction renderAvailableProviders(props) {\n    const { schema } = props;\n    const title = schema.title;\n    const desc = schema.description;\n    const settings = props.formContext.settings;\n    const userData = settings.get(AVAILABLE_PROVIDERS).user;\n    const items = {\n        ...schema.default\n    };\n    if (userData) {\n        for (const key of Object.keys(items)) {\n            if (key in userData) {\n                items[key] = userData[key];\n            }\n            else {\n                items[key] = -1;\n            }\n        }\n    }\n    const [settingValue, setValue] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(items);\n    const onSettingChange = (key, e) => {\n        const newValue = {\n            ...settingValue,\n            [key]: parseInt(e.target.value)\n        };\n        settings.set(AVAILABLE_PROVIDERS, newValue).catch(console.error);\n        setValue(newValue);\n    };\n    return (\n    //TODO Remove hard coded class names\n    react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", null,\n        react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"fieldset\", null,\n            react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"legend\", null, title),\n            react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"p\", { className: \"field-description\" }, desc),\n            Object.keys(items).map(key => {\n                return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", { key: key, className: \"form-group small-field\" },\n                    react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", null,\n                        react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"h3\", null,\n                            \" \",\n                            key),\n                        react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", { className: \"inputFieldWrapper\" },\n                            react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"input\", { className: \"form-control\", type: \"number\", value: settingValue[key], onChange: e => {\n                                    onSettingChange(key, e);\n                                } })))));\n            }))));\n}\n//# sourceMappingURL=renderer.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/completer-extension/lib/renderer.js?");

/***/ })

}]);