Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/@buffetjs/utils/build/ drwxr-xr-x | |
| Viewing file: Select action/file-type: (function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("lodash"), require("yup"));
else if(typeof define === 'function' && define.amd)
define("@buffetjs/utils", ["lodash", "yup"], factory);
else if(typeof exports === 'object')
exports["@buffetjs/utils"] = factory(require("lodash"), require("yup"));
else
root["@buffetjs/utils"] = factory(root["lodash"], root["yup"]);
})(window, function(__WEBPACK_EXTERNAL_MODULE_lodash__, __WEBPACK_EXTERNAL_MODULE_yup__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = "./src/index.js");
/******/ })
/************************************************************************/
/******/ ({
/***/ "./src/createYupSchema.js":
/*!********************************!*\
!*** ./src/createYupSchema.js ***!
\********************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var yup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! yup */ \"yup\");\n/* harmony import */ var yup__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(yup__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\nvar createYupSchema = function createYupSchema(type, validations) {\n var translatedErrors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var schema = yup__WEBPACK_IMPORTED_MODULE_1__[\"mixed\"]();\n\n if (['text', 'textarea', 'email', 'password', 'select'].includes(type)) {\n schema = yup__WEBPACK_IMPORTED_MODULE_1__[\"string\"](translatedErrors.string);\n }\n\n if (type === 'email') {\n schema = schema.email(translatedErrors.email);\n }\n\n if (type === 'number') {\n schema = yup__WEBPACK_IMPORTED_MODULE_1__[\"number\"]().transform(function (cv) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"isNaN\"])(cv) ? undefined : cv;\n }).typeError(translatedErrors.number);\n }\n\n if (['date', 'datetime'].includes(type)) {\n schema = schema.date().typeError(translatedErrors.date);\n }\n\n Object.keys(validations).forEach(function (validation) {\n var validationValue = validations[validation];\n\n if (!!validationValue || !Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"isBoolean\"])(validationValue) && Number.isInteger(Math.floor(validationValue)) || validationValue === 0) {\n switch (validation) {\n case 'required':\n schema = schema.required(translatedErrors.required);\n break;\n\n case 'max':\n schema = schema.max(validationValue, translatedErrors.max);\n break;\n\n case 'maxLength':\n schema = schema.max(validationValue, translatedErrors.maxLength);\n break;\n\n case 'min':\n schema = schema.min(validationValue, translatedErrors.min);\n break;\n\n case 'minLength':\n schema = schema.min(validationValue, translatedErrors.minLength);\n break;\n\n case 'regex':\n schema = schema.matches(validationValue, translatedErrors.regex);\n break;\n\n case 'lowercase':\n if (['text', 'textarea', 'email', 'string'].includes(type)) {\n schema = schema.strict().lowercase();\n }\n\n break;\n\n case 'uppercase':\n if (['text', 'textarea', 'email', 'string'].includes(type)) {\n schema = schema.strict().uppercase(translatedErrors.uppercase);\n }\n\n break;\n\n case 'positive':\n if (['number', 'integer', 'bigint', 'float', 'decimal'].includes(type)) {\n schema = schema.positive();\n }\n\n break;\n\n case 'negative':\n if (['number', 'integer', 'bigint', 'float', 'decimal'].includes(type)) {\n schema = schema.negative();\n }\n\n break;\n\n default:\n }\n }\n });\n return schema;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createYupSchema);\n\n//# sourceURL=webpack://@buffetjs/utils/./src/createYupSchema.js?");
/***/ }),
/***/ "./src/gradient.js":
/*!*************************!*\
!*** ./src/gradient.js ***!
\*************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nvar subtractLight = function subtractLight(color, amount) {\n var cc = parseInt(color, 16) - amount;\n var c = cc < 0 ? 0 : cc;\n c = c.toString(16).length > 1 ? c.toString(16) : \"0\".concat(c.toString(16));\n return c;\n};\n\nvar gradient = function gradient(colour, amount) {\n var color = colour.indexOf('#') >= 0 ? colour.substring(1, colour.length) : colour;\n var percentage = parseInt(255 * amount / 100, 10);\n color = \"#\".concat(subtractLight(color.substring(0, 2), percentage)).concat(subtractLight(color.substring(2, 4), percentage)).concat(subtractLight(color.substring(4, 6), percentage));\n return color;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (gradient);\n\n//# sourceURL=webpack://@buffetjs/utils/./src/gradient.js?");
/***/ }),
/***/ "./src/index.js":
/*!**********************!*\
!*** ./src/index.js ***!
\**********************/
/*! exports provided: createYupSchema, gradient */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _createYupSchema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./createYupSchema */ \"./src/createYupSchema.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createYupSchema\", function() { return _createYupSchema__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _gradient__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./gradient */ \"./src/gradient.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"gradient\", function() { return _gradient__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n// Utils\n\n\n\n//# sourceURL=webpack://@buffetjs/utils/./src/index.js?");
/***/ }),
/***/ "lodash":
/*!*************************!*\
!*** external "lodash" ***!
\*************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = __WEBPACK_EXTERNAL_MODULE_lodash__;\n\n//# sourceURL=webpack://@buffetjs/utils/external_%22lodash%22?");
/***/ }),
/***/ "yup":
/*!**********************!*\
!*** external "yup" ***!
\**********************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = __WEBPACK_EXTERNAL_MODULE_yup__;\n\n//# sourceURL=webpack://@buffetjs/utils/external_%22yup%22?");
/***/ })
/******/ });
}); |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0911 ]-- |