279 lines
10 KiB
JavaScript
279 lines
10 KiB
JavaScript
module.exports =
|
||
/******/ (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 = "fb15");
|
||
/******/ })
|
||
/************************************************************************/
|
||
/******/ ({
|
||
|
||
/***/ "8875":
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
|
||
// MIT license
|
||
// source: https://github.com/amiller-gh/currentScript-polyfill
|
||
|
||
// added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505
|
||
|
||
(function (root, factory) {
|
||
if (true) {
|
||
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
||
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
||
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
||
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
||
} else {}
|
||
}(typeof self !== 'undefined' ? self : this, function () {
|
||
function getCurrentScript () {
|
||
var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript')
|
||
// for chrome
|
||
if (!descriptor && 'currentScript' in document && document.currentScript) {
|
||
return document.currentScript
|
||
}
|
||
|
||
// for other browsers with native support for currentScript
|
||
if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) {
|
||
return document.currentScript
|
||
}
|
||
|
||
// IE 8-10 support script readyState
|
||
// IE 11+ & Firefox support stack trace
|
||
try {
|
||
throw new Error();
|
||
}
|
||
catch (err) {
|
||
// Find the second match for the "at" string to get file src url from stack.
|
||
var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
|
||
ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
|
||
stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
|
||
scriptLocation = (stackDetails && stackDetails[1]) || false,
|
||
line = (stackDetails && stackDetails[2]) || false,
|
||
currentLocation = document.location.href.replace(document.location.hash, ''),
|
||
pageSource,
|
||
inlineScriptSourceRegExp,
|
||
inlineScriptSource,
|
||
scripts = document.getElementsByTagName('script'); // Live NodeList collection
|
||
|
||
if (scriptLocation === currentLocation) {
|
||
pageSource = document.documentElement.outerHTML;
|
||
inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*', 'i');
|
||
inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, '$1').trim();
|
||
}
|
||
|
||
for (var i = 0; i < scripts.length; i++) {
|
||
// If ready state is interactive, return the script tag
|
||
if (scripts[i].readyState === 'interactive') {
|
||
return scripts[i];
|
||
}
|
||
|
||
// If src matches, return the script tag
|
||
if (scripts[i].src === scriptLocation) {
|
||
return scripts[i];
|
||
}
|
||
|
||
// If inline source matches, return the script tag
|
||
if (
|
||
scriptLocation === currentLocation &&
|
||
scripts[i].innerHTML &&
|
||
scripts[i].innerHTML.trim() === inlineScriptSource
|
||
) {
|
||
return scripts[i];
|
||
}
|
||
}
|
||
|
||
// If no match, return null
|
||
return null;
|
||
}
|
||
};
|
||
|
||
return getCurrentScript
|
||
}));
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "fb15":
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
// ESM COMPAT FLAG
|
||
__webpack_require__.r(__webpack_exports__);
|
||
|
||
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
||
// This file is imported into lib/wc client bundles.
|
||
|
||
if (typeof window !== 'undefined') {
|
||
var currentScript = window.document.currentScript
|
||
if (true) {
|
||
var getCurrentScript = __webpack_require__("8875")
|
||
currentScript = getCurrentScript()
|
||
|
||
// for backward compatibility, because previously we directly included the polyfill
|
||
if (!('currentScript' in document)) {
|
||
Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
|
||
}
|
||
}
|
||
|
||
var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
|
||
if (src) {
|
||
__webpack_require__.p = src[1] // eslint-disable-line
|
||
}
|
||
}
|
||
|
||
// Indicate to webpack that this file can be concatenated
|
||
/* harmony default export */ var setPublicPath = (null);
|
||
|
||
// CONCATENATED MODULE: ./src/custom/apaas-custom-plugin-rule-functions/custom-functions/cubic/cubic.js
|
||
/*
|
||
* cubic函数
|
||
* 求三次方
|
||
* 接收一个数字类型的参数,并求其三次方并返回
|
||
*/
|
||
/* harmony default export */ var cubic = ({
|
||
// 函数名必须以custom开头,否则无法被解析
|
||
name: 'customcubic',
|
||
// 校验函数,用于函数保存前的校验, 可以对参数的个数及类型做限制
|
||
mockFunction: function mockFunction() {
|
||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||
args[_key] = arguments[_key];
|
||
}
|
||
if (!(args && args.length === 1)) {
|
||
throw new Error('参数长度必须是1个');
|
||
}
|
||
if (isNaN(parseFloat(args[0])) || !isFinite(args[0])) {
|
||
throw new Error('参数类型必须是数字');
|
||
}
|
||
},
|
||
// 执行函数, 接收到参数后的处理方法,必须有返回值
|
||
executeFunction: function executeFunction() {
|
||
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
||
args[_key2] = arguments[_key2];
|
||
}
|
||
if (!(args && args.length === 1)) {
|
||
throw new Error('参数长度必须是1个');
|
||
}
|
||
if (isNaN(parseFloat(args[0])) || !isFinite(args[0])) {
|
||
throw new Error('参数类型必须是数字');
|
||
}
|
||
return args[0] * args[0] * args[0];
|
||
}
|
||
});
|
||
// CONCATENATED MODULE: ./src/custom/apaas-custom-plugin-rule-functions/custom-functions/index.js
|
||
|
||
/* harmony default export */ var custom_functions = ({
|
||
Cubic: cubic
|
||
});
|
||
// CONCATENATED MODULE: ./src/custom/apaas-custom-plugin-rule-functions/app.js
|
||
|
||
var app_install = function install(_ref, hookManager, definition) {
|
||
var RuleEngine = _ref.RuleEngine;
|
||
if (!RuleEngine) {
|
||
console.error('x-extension上下文中没有注册RuleEngine, 请检查');
|
||
return;
|
||
}
|
||
Object.keys(custom_functions).forEach(function (funcKey) {
|
||
var func = custom_functions[funcKey];
|
||
if (func && func.name && func.executeFunction && func.executeFunction instanceof Function) {
|
||
if (func.name.indexOf('custom') !== 0) {
|
||
console.error("\u81EA\u5B9A\u4E49\u51FD\u6570-".concat(func.name, " \u540D\u79F0\u6709\u8BEF\uFF0C\u8BF7\u4EE5custom\u5F00\u5934"));
|
||
return;
|
||
}
|
||
RuleEngine.getInstance().registerContextMethod(func.name, func);
|
||
} else {
|
||
console.error("\u8BF7\u68C0\u67E5".concat(func && func.name, "\u7684\u89C4\u5219\u51FD\u6570\u5B9A\u4E49"));
|
||
}
|
||
});
|
||
};
|
||
/* harmony default export */ var app = ({
|
||
install: app_install
|
||
});
|
||
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
||
|
||
|
||
/* harmony default export */ var entry_lib = __webpack_exports__["default"] = (app);
|
||
|
||
|
||
|
||
/***/ })
|
||
|
||
/******/ }); |