import '../scss/app.scss';

import './components/polyfills/polyfill';
import './components/builder/builder';


global.extend = function () {
    // Variables
    var extended = {};
    // Merge the object into the extended object
    var merge = function (obj) {
        for (var prop in obj) {
            if (obj.hasOwnProperty(prop)) {
                if (Object.prototype.toString.call(obj[prop]) === '[object Object]') {
                    // If we're doing a deep merge and the property is an object
                    extended[prop] = extend(true, extended[prop], obj[prop]);
                } else {
                    // Otherwise, do a regular merge
                    extended[prop] = obj[prop];
                }
            }
        }
    };
    // Loop through each object and conduct a merge
    for (var i = 0; i < arguments.length; i++) {
        merge(arguments[i]);
    }

    return extended;
};