Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/cartforge.co/pub/static/frontend/Magento/blank/en_US/jquery/bootstrap/dom/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/cartforge.co/pub/static/frontend/Magento/blank/en_US/jquery/bootstrap/dom/data.js
/**
 * --------------------------------------------------------------------------
 * Bootstrap (v5.1.3): dom/data.js
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
 * --------------------------------------------------------------------------
 */

define([], function() {
    'use strict';

    /**
     * ------------------------------------------------------------------------
     * Constants
     * ------------------------------------------------------------------------
     */

    const elementMap = new Map();

    return {
        set: function (element, key, instance) {
            if (!elementMap.has(element)) {
                elementMap.set(element, new Map())
            }

            const instanceMap = elementMap.get(element);

            // make it clear we only want one instance per element
            // can be removed later when multiple key/instances are fine to be used
            if (!instanceMap.has(key) && instanceMap.size !== 0) {
                // eslint-disable-next-line no-console
                console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`)
                return
            }

            instanceMap.set(key, instance)
        },

        get: function (element, key) {
            if (elementMap.has(element)) {
                return elementMap.get(element).get(key) || null
            }

            return null
        },

        remove: function (element, key) {
            if (!elementMap.has(element)) {
                return
            }

            const instanceMap = elementMap.get(element);

            instanceMap.delete(key)

            // free up element references if there are no instances left for an element
            if (instanceMap.size === 0) {
                elementMap.delete(element)
            }
        }
    }
});

Spamworldpro Mini