VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /var/www/html/libs/absol-full/dist/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/libs/absol-full/dist/js/mdls__absol__src__HTML5__OOP.js
/*** module: node_modules/absol/src/HTML5/OOP.js ***/
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.overrideMethod = overrideMethod;
exports.drillProperty = drillProperty;
exports.bindFunctions = bindFunctions;
exports.inheritCreator = inheritCreator;
exports.mixClass = mixClass;
exports.default = void 0;

/**
 * @param {Object} object
 * @param {String} key
 * @param {Function} method
 */
function overrideMethod(object, key, method) {
  if (object[key] === undefined) object[key] = method;else {
    var _superMethod = object[key];

    object[key] = function (_superMethod, method) {
      return function () {
        var _super = this.super;
        this.super = _superMethod;
        var result = method.apply(this, arguments);
        this.super = _super;
        return result;
      };
    }(_superMethod, method);
  }
}

function extendsObject(object, prototype) {
  // do not use setter, getter
  for (var key in prototype) {
    if (key !== 'constructor' && key !== '__proto__') {
      if (typeof prototype[key] == 'function') {
        overrideMethod(object, key, prototype[key]);
      } else if (prototype[key] !== undefined && prototype[key] !== null) {
        object[key] = prototype[key]; //just copy
      }
    }
  }
}

;

function quickInheritObject(child, parent) {
  // do not use setter, getter
  Object.keys(parent).forEach(function (key) {
    if (key !== 'constructor' && typeof parent[key] == 'function') {
      var superMethod = parent[key];
      var currentMethod = child[key];
      if (!currentMethod) child[key] = superMethod;else {
        child[key] = function () {
          var _super = this.super;
          this.super = superMethod;
          var result = currentMethod.apply(this, arguments);
          this.super = _super;
          return result;
        };
      }
    }
  });
}

;

function drillProperty(topObject, botObject, keyTop, keyBot) {
  if (typeof keyTop == 'string') {
    keyBot = keyBot || keyTop;
    Object.defineProperty(topObject, keyTop, {
      set: function (value) {
        botObject[keyBot] = value;
      },
      get: function () {
        return botObject[keyBot];
      },
      configurable: true
    });
  } else {
    if (keyTop instanceof Array) {
      for (var i = 0; i < keyTop.length; ++i) {
        drillProperty(topObject, botObject, keyTop[i], keyTop[i]);
      }
    } else {
      for (var key in keyTop) {
        drillProperty(topObject, botObject, key, keyTop[key]);
      }
    }
  }
}

;

function bindFunctions(_this, handlers) {
  var res = {};

  for (var key in handlers) {
    res[key] = handlers[key].bind(_this);
  }

  return res;
}

;

function inheritCreator(parent, child) {
  var i;

  if (child.property) {
    if (parent.property) {
      for (i in parent.property) {
        if (!child.property[i]) child.property[i] = parent.property[i];
      }
    }
  }

  for (i in parent.prototype) {
    if (!child.prototype[i]) {
      child.prototype[i] = parent.prototype[i];
    } else {
      child.prototype[i] = function (superFunction, childFunction) {
        return function () {
          var _super = this.super;
          this.super = superFunction;
          var result = childFunction.apply(this, arguments);
          this.super = _super;
          return result;
        };
      }(parent.prototype[i], child.prototype[i]);
    }
  }
}

;
/***
 *
 * @param {Function} constructor
 */

function mixClass(constructor) {
  var descriptors = {};

  for (var i = 1; i < arguments.length; ++i) {
    Object.assign(descriptors, Object.getOwnPropertyDescriptors(arguments[i].prototype));
  }

  delete descriptors.constructor;
  Object.defineProperties(constructor.prototype, descriptors);
}

var OOP = {
  overrideMethod: overrideMethod,
  extends: extendsObject,
  inherit: quickInheritObject,
  mixClass: mixClass,
  inheritCreator: inheritCreator,
  drillProperty: drillProperty,
  bindFunctions: bindFunctions
};
var _default = OOP;
exports.default = _default;

VaKeR 2022