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

/***/ "../node_modules/@lumino/signaling/dist/index.es6.js":
/*!***********************************************************!*\
  !*** ../node_modules/@lumino/signaling/dist/index.es6.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 */   Signal: () => (/* binding */ Signal),\n/* harmony export */   Stream: () => (/* binding */ Stream)\n/* harmony export */ });\n/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @lumino/algorithm */ \"webpack/sharing/consume/default/@lumino/algorithm/@lumino/algorithm\");\n/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_lumino_algorithm__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\n\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * @packageDocumentation\n * @module signaling\n */\n/**\n * A concrete implementation of `ISignal`.\n *\n * #### Example\n * ```typescript\n * import { ISignal, Signal } from '@lumino/signaling';\n *\n * class SomeClass {\n *\n *   constructor(name: string) {\n *     this.name = name;\n *   }\n *\n *   readonly name: string;\n *\n *   get valueChanged: ISignal<this, number> {\n *     return this._valueChanged;\n *   }\n *\n *   get value(): number {\n *     return this._value;\n *   }\n *\n *   set value(value: number) {\n *     if (value === this._value) {\n *       return;\n *     }\n *     this._value = value;\n *     this._valueChanged.emit(value);\n *   }\n *\n *   private _value = 0;\n *   private _valueChanged = new Signal<this, number>(this);\n * }\n *\n * function logger(sender: SomeClass, value: number): void {\n *   console.log(sender.name, value);\n * }\n *\n * let m1 = new SomeClass('foo');\n * let m2 = new SomeClass('bar');\n *\n * m1.valueChanged.connect(logger);\n * m2.valueChanged.connect(logger);\n *\n * m1.value = 42;  // logs: foo 42\n * m2.value = 17;  // logs: bar 17\n * ```\n */\nclass Signal {\n    /**\n     * Construct a new signal.\n     *\n     * @param sender - The sender which owns the signal.\n     */\n    constructor(sender) {\n        this.sender = sender;\n    }\n    /**\n     * Connect a slot to the signal.\n     *\n     * @param slot - The slot to invoke when the signal is emitted.\n     *\n     * @param thisArg - The `this` context for the slot. If provided,\n     *   this must be a non-primitive object.\n     *\n     * @returns `true` if the connection succeeds, `false` otherwise.\n     */\n    connect(slot, thisArg) {\n        return Private.connect(this, slot, thisArg);\n    }\n    /**\n     * Disconnect a slot from the signal.\n     *\n     * @param slot - The slot to disconnect from the signal.\n     *\n     * @param thisArg - The `this` context for the slot. If provided,\n     *   this must be a non-primitive object.\n     *\n     * @returns `true` if the connection is removed, `false` otherwise.\n     */\n    disconnect(slot, thisArg) {\n        return Private.disconnect(this, slot, thisArg);\n    }\n    /**\n     * Emit the signal and invoke the connected slots.\n     *\n     * @param args - The args to pass to the connected slots.\n     *\n     * #### Notes\n     * Slots are invoked synchronously in connection order.\n     *\n     * Exceptions thrown by connected slots will be caught and logged.\n     */\n    emit(args) {\n        Private.emit(this, args);\n    }\n}\n/**\n * The namespace for the `Signal` class statics.\n */\n(function (Signal) {\n    /**\n     * Remove all connections between a sender and receiver.\n     *\n     * @param sender - The sender object of interest.\n     *\n     * @param receiver - The receiver object of interest.\n     *\n     * #### Notes\n     * If a `thisArg` is provided when connecting a signal, that object\n     * is considered the receiver. Otherwise, the `slot` is considered\n     * the receiver.\n     */\n    function disconnectBetween(sender, receiver) {\n        Private.disconnectBetween(sender, receiver);\n    }\n    Signal.disconnectBetween = disconnectBetween;\n    /**\n     * Remove all connections where the given object is the sender.\n     *\n     * @param sender - The sender object of interest.\n     */\n    function disconnectSender(sender) {\n        Private.disconnectSender(sender);\n    }\n    Signal.disconnectSender = disconnectSender;\n    /**\n     * Remove all connections where the given object is the receiver.\n     *\n     * @param receiver - The receiver object of interest.\n     *\n     * #### Notes\n     * If a `thisArg` is provided when connecting a signal, that object\n     * is considered the receiver. Otherwise, the `slot` is considered\n     * the receiver.\n     */\n    function disconnectReceiver(receiver) {\n        Private.disconnectReceiver(receiver);\n    }\n    Signal.disconnectReceiver = disconnectReceiver;\n    /**\n     * Remove all connections where an object is the sender or receiver.\n     *\n     * @param object - The object of interest.\n     *\n     * #### Notes\n     * If a `thisArg` is provided when connecting a signal, that object\n     * is considered the receiver. Otherwise, the `slot` is considered\n     * the receiver.\n     */\n    function disconnectAll(object) {\n        Private.disconnectAll(object);\n    }\n    Signal.disconnectAll = disconnectAll;\n    /**\n     * Clear all signal data associated with the given object.\n     *\n     * @param object - The object for which the data should be cleared.\n     *\n     * #### Notes\n     * This removes all signal connections and any other signal data\n     * associated with the object.\n     */\n    function clearData(object) {\n        Private.disconnectAll(object);\n    }\n    Signal.clearData = clearData;\n    /**\n     * Get the signal exception handler.\n     *\n     * @returns The current exception handler.\n     *\n     * #### Notes\n     * The default exception handler is `console.error`.\n     */\n    function getExceptionHandler() {\n        return Private.exceptionHandler;\n    }\n    Signal.getExceptionHandler = getExceptionHandler;\n    /**\n     * Set the signal exception handler.\n     *\n     * @param handler - The function to use as the exception handler.\n     *\n     * @returns The old exception handler.\n     *\n     * #### Notes\n     * The exception handler is invoked when a slot throws an exception.\n     */\n    function setExceptionHandler(handler) {\n        let old = Private.exceptionHandler;\n        Private.exceptionHandler = handler;\n        return old;\n    }\n    Signal.setExceptionHandler = setExceptionHandler;\n})(Signal || (Signal = {}));\n/**\n * A concrete implementation of `IStream`.\n *\n * #### Example\n * ```typescript\n * import { IStream, Stream } from '@lumino/signaling';\n *\n * class SomeClass {\n *\n *   constructor(name: string) {\n *     this.name = name;\n *   }\n *\n *   readonly name: string;\n *\n *   get pings(): IStream<this, string> {\n *     return this._pings;\n *   }\n *\n *   ping(value: string) {\n *     this._pings.emit(value);\n *   }\n *\n *   private _pings = new Stream<this, string>(this);\n * }\n *\n * let m1 = new SomeClass('foo');\n *\n * m1.pings.connect((_, value: string) => {\n *   console.log('connect', value);\n * });\n *\n * void (async () => {\n *   for await (const ping of m1.pings) {\n *     console.log('iterator', ping);\n *   }\n * })();\n *\n * m1.ping('alpha');  // logs: connect alpha\n *                    // logs: iterator alpha\n * m1.ping('beta');   // logs: connect beta\n *                    // logs: iterator beta\n * ```\n */\nclass Stream extends Signal {\n    constructor() {\n        super(...arguments);\n        this._pending = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__.PromiseDelegate();\n    }\n    /**\n     * Return an async iterator that yields every emission.\n     */\n    async *[Symbol.asyncIterator]() {\n        let pending = this._pending;\n        while (true) {\n            try {\n                const { args, next } = await pending.promise;\n                pending = next;\n                yield args;\n            }\n            catch (_) {\n                return; // Any promise rejection stops the iterator.\n            }\n        }\n    }\n    /**\n     * Emit the signal, invoke the connected slots, and yield the emission.\n     *\n     * @param args - The args to pass to the connected slots.\n     */\n    emit(args) {\n        const pending = this._pending;\n        const next = (this._pending = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__.PromiseDelegate());\n        pending.resolve({ args, next });\n        super.emit(args);\n    }\n    /**\n     * Stop the stream's async iteration.\n     */\n    stop() {\n        this._pending.promise.catch(() => undefined);\n        this._pending.reject('stop');\n        this._pending = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__.PromiseDelegate();\n    }\n}\n/**\n * The namespace for the module implementation details.\n */\nvar Private;\n(function (Private) {\n    /**\n     * The signal exception handler function.\n     */\n    Private.exceptionHandler = (err) => {\n        console.error(err);\n    };\n    /**\n     * Connect a slot to a signal.\n     *\n     * @param signal - The signal of interest.\n     *\n     * @param slot - The slot to invoke when the signal is emitted.\n     *\n     * @param thisArg - The `this` context for the slot. If provided,\n     *   this must be a non-primitive object.\n     *\n     * @returns `true` if the connection succeeds, `false` otherwise.\n     */\n    function connect(signal, slot, thisArg) {\n        // Coerce a `null` `thisArg` to `undefined`.\n        thisArg = thisArg || undefined;\n        // Ensure the sender's array of receivers is created.\n        let receivers = receiversForSender.get(signal.sender);\n        if (!receivers) {\n            receivers = [];\n            receiversForSender.set(signal.sender, receivers);\n        }\n        // Bail if a matching connection already exists.\n        if (findConnection(receivers, signal, slot, thisArg)) {\n            return false;\n        }\n        // Choose the best object for the receiver.\n        let receiver = thisArg || slot;\n        // Ensure the receiver's array of senders is created.\n        let senders = sendersForReceiver.get(receiver);\n        if (!senders) {\n            senders = [];\n            sendersForReceiver.set(receiver, senders);\n        }\n        // Create a new connection and add it to the end of each array.\n        let connection = { signal, slot, thisArg };\n        receivers.push(connection);\n        senders.push(connection);\n        // Indicate a successful connection.\n        return true;\n    }\n    Private.connect = connect;\n    /**\n     * Disconnect a slot from a signal.\n     *\n     * @param signal - The signal of interest.\n     *\n     * @param slot - The slot to disconnect from the signal.\n     *\n     * @param thisArg - The `this` context for the slot. If provided,\n     *   this must be a non-primitive object.\n     *\n     * @returns `true` if the connection is removed, `false` otherwise.\n     */\n    function disconnect(signal, slot, thisArg) {\n        // Coerce a `null` `thisArg` to `undefined`.\n        thisArg = thisArg || undefined;\n        // Lookup the list of receivers, and bail if none exist.\n        let receivers = receiversForSender.get(signal.sender);\n        if (!receivers || receivers.length === 0) {\n            return false;\n        }\n        // Bail if no matching connection exits.\n        let connection = findConnection(receivers, signal, slot, thisArg);\n        if (!connection) {\n            return false;\n        }\n        // Choose the best object for the receiver.\n        let receiver = thisArg || slot;\n        // Lookup the array of senders, which is now known to exist.\n        let senders = sendersForReceiver.get(receiver);\n        // Clear the connection and schedule cleanup of the arrays.\n        connection.signal = null;\n        scheduleCleanup(receivers);\n        scheduleCleanup(senders);\n        // Indicate a successful disconnection.\n        return true;\n    }\n    Private.disconnect = disconnect;\n    /**\n     * Remove all connections between a sender and receiver.\n     *\n     * @param sender - The sender object of interest.\n     *\n     * @param receiver - The receiver object of interest.\n     */\n    function disconnectBetween(sender, receiver) {\n        // If there are no receivers, there is nothing to do.\n        let receivers = receiversForSender.get(sender);\n        if (!receivers || receivers.length === 0) {\n            return;\n        }\n        // If there are no senders, there is nothing to do.\n        let senders = sendersForReceiver.get(receiver);\n        if (!senders || senders.length === 0) {\n            return;\n        }\n        // Clear each connection between the sender and receiver.\n        for (const connection of senders) {\n            // Skip connections which have already been cleared.\n            if (!connection.signal) {\n                continue;\n            }\n            // Clear the connection if it matches the sender.\n            if (connection.signal.sender === sender) {\n                connection.signal = null;\n            }\n        }\n        // Schedule a cleanup of the senders and receivers.\n        scheduleCleanup(receivers);\n        scheduleCleanup(senders);\n    }\n    Private.disconnectBetween = disconnectBetween;\n    /**\n     * Remove all connections where the given object is the sender.\n     *\n     * @param sender - The sender object of interest.\n     */\n    function disconnectSender(sender) {\n        // If there are no receivers, there is nothing to do.\n        let receivers = receiversForSender.get(sender);\n        if (!receivers || receivers.length === 0) {\n            return;\n        }\n        // Clear each receiver connection.\n        for (const connection of receivers) {\n            // Skip connections which have already been cleared.\n            if (!connection.signal) {\n                continue;\n            }\n            // Choose the best object for the receiver.\n            let receiver = connection.thisArg || connection.slot;\n            // Clear the connection.\n            connection.signal = null;\n            // Cleanup the array of senders, which is now known to exist.\n            scheduleCleanup(sendersForReceiver.get(receiver));\n        }\n        // Schedule a cleanup of the receivers.\n        scheduleCleanup(receivers);\n    }\n    Private.disconnectSender = disconnectSender;\n    /**\n     * Remove all connections where the given object is the receiver.\n     *\n     * @param receiver - The receiver object of interest.\n     */\n    function disconnectReceiver(receiver) {\n        // If there are no senders, there is nothing to do.\n        let senders = sendersForReceiver.get(receiver);\n        if (!senders || senders.length === 0) {\n            return;\n        }\n        // Clear each sender connection.\n        for (const connection of senders) {\n            // Skip connections which have already been cleared.\n            if (!connection.signal) {\n                continue;\n            }\n            // Lookup the sender for the connection.\n            let sender = connection.signal.sender;\n            // Clear the connection.\n            connection.signal = null;\n            // Cleanup the array of receivers, which is now known to exist.\n            scheduleCleanup(receiversForSender.get(sender));\n        }\n        // Schedule a cleanup of the list of senders.\n        scheduleCleanup(senders);\n    }\n    Private.disconnectReceiver = disconnectReceiver;\n    /**\n     * Remove all connections where an object is the sender or receiver.\n     *\n     * @param object - The object of interest.\n     */\n    function disconnectAll(object) {\n        // Remove all connections where the given object is the sender.\n        disconnectSender(object);\n        // Remove all connections where the given object is the receiver.\n        disconnectReceiver(object);\n    }\n    Private.disconnectAll = disconnectAll;\n    /**\n     * Emit a signal and invoke its connected slots.\n     *\n     * @param signal - The signal of interest.\n     *\n     * @param args - The args to pass to the connected slots.\n     *\n     * #### Notes\n     * Slots are invoked synchronously in connection order.\n     *\n     * Exceptions thrown by connected slots will be caught and logged.\n     */\n    function emit(signal, args) {\n        // If there are no receivers, there is nothing to do.\n        let receivers = receiversForSender.get(signal.sender);\n        if (!receivers || receivers.length === 0) {\n            return;\n        }\n        // Invoke the slots for connections with a matching signal.\n        // Any connections added during emission are not invoked.\n        for (let i = 0, n = receivers.length; i < n; ++i) {\n            let connection = receivers[i];\n            if (connection.signal === signal) {\n                invokeSlot(connection, args);\n            }\n        }\n    }\n    Private.emit = emit;\n    /**\n     * A weak mapping of sender to array of receiver connections.\n     */\n    const receiversForSender = new WeakMap();\n    /**\n     * A weak mapping of receiver to array of sender connections.\n     */\n    const sendersForReceiver = new WeakMap();\n    /**\n     * A set of connection arrays which are pending cleanup.\n     */\n    const dirtySet = new Set();\n    /**\n     * A function to schedule an event loop callback.\n     */\n    const schedule = (() => {\n        let ok = typeof requestAnimationFrame === 'function';\n        return ok ? requestAnimationFrame : setImmediate;\n    })();\n    /**\n     * Find a connection which matches the given parameters.\n     */\n    function findConnection(connections, signal, slot, thisArg) {\n        return (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_0__.find)(connections, connection => connection.signal === signal &&\n            connection.slot === slot &&\n            connection.thisArg === thisArg);\n    }\n    /**\n     * Invoke a slot with the given parameters.\n     *\n     * The connection is assumed to be valid.\n     *\n     * Exceptions in the slot will be caught and logged.\n     */\n    function invokeSlot(connection, args) {\n        let { signal, slot, thisArg } = connection;\n        try {\n            slot.call(thisArg, signal.sender, args);\n        }\n        catch (err) {\n            Private.exceptionHandler(err);\n        }\n    }\n    /**\n     * Schedule a cleanup of a connection array.\n     *\n     * This will add the array to the dirty set and schedule a deferred\n     * cleanup of the array contents. On cleanup, any connection with a\n     * `null` signal will be removed from the array.\n     */\n    function scheduleCleanup(array) {\n        if (dirtySet.size === 0) {\n            schedule(cleanupDirtySet);\n        }\n        dirtySet.add(array);\n    }\n    /**\n     * Cleanup the connection lists in the dirty set.\n     *\n     * This function should only be invoked asynchronously, when the\n     * stack frame is guaranteed to not be on the path of user code.\n     */\n    function cleanupDirtySet() {\n        dirtySet.forEach(cleanupConnections);\n        dirtySet.clear();\n    }\n    /**\n     * Cleanup the dirty connections in a connections array.\n     *\n     * This will remove any connection with a `null` signal.\n     *\n     * This function should only be invoked asynchronously, when the\n     * stack frame is guaranteed to not be on the path of user code.\n     */\n    function cleanupConnections(connections) {\n        _lumino_algorithm__WEBPACK_IMPORTED_MODULE_0__.ArrayExt.removeAllWhere(connections, isDeadConnection);\n    }\n    /**\n     * Test whether a connection is dead.\n     *\n     * A dead connection has a `null` signal.\n     */\n    function isDeadConnection(connection) {\n        return connection.signal === null;\n    }\n})(Private || (Private = {}));\n\n\n//# sourceMappingURL=index.es6.js.map\n\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@lumino/signaling/dist/index.es6.js?");

/***/ })

}]);