You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
935 lines
43 KiB
935 lines
43 KiB
(self["webpackChunk"] = self["webpackChunk"] || []).push([[22307],{
|
|
|
|
/***/ 6584:
|
|
/*!************************************************!*\
|
|
!*** ./src/pages/Report/index.tsx + 2 modules ***!
|
|
\************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
// ESM COMPAT FLAG
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"default": function() { return /* binding */ pages_Report; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/skeleton/style/index.js + 1 modules
|
|
var style = __webpack_require__(61099);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/skeleton/index.js + 11 modules
|
|
var skeleton = __webpack_require__(73481);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
|
|
var regeneratorRuntime = __webpack_require__(17061);
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
|
|
var objectSpread2 = __webpack_require__(42122);
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
|
|
var asyncToGenerator = __webpack_require__(17156);
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
|
|
var slicedToArray = __webpack_require__(27424);
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js
|
|
var objectDestructuringEmpty = __webpack_require__(13012);
|
|
var objectDestructuringEmpty_default = /*#__PURE__*/__webpack_require__.n(objectDestructuringEmpty);
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
var react = __webpack_require__(67294);
|
|
;// CONCATENATED MODULE: ./src/pages/Report/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Reportmodules = ({"flex_box_center":"flex_box_center___IR3nC","flex_space_between":"flex_space_between___JcsmH","flex_box_vertical_center":"flex_box_vertical_center___IRiko","flex_box_center_end":"flex_box_center_end___ftPaf","flex_box_column":"flex_box_column___hdDa7","wrap":"wrap___piUeX","title":"title___I5uPP","content":"content___gw7wC","head":"head___hHUXu","box":"box___YE3Dx","border":"border___CC17U","table":"table___n6I4T","left":"left___OpmaU","right":"right___TgkNr","g":"g___cLluq","y":"y___fCl6N","sub":"sub___xRfBS","headLine":"headLine___Rbe7M","code":"code___C88hv","lineNum":"lineNum___iHGoS","lineCode":"lineCode___W2Lso","line":"line___TytSR","highlight":"highlight___f7y_z"});
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(84519);
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 8 modules
|
|
var _umi_production_exports = __webpack_require__(89214);
|
|
// EXTERNAL MODULE: ./node_modules/js-base64/base64.js
|
|
var base64 = __webpack_require__(19575);
|
|
;// CONCATENATED MODULE: ./src/pages/Report/img/pt0.png
|
|
var pt0_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAwCAYAAABNPhkJAAAAAXNSR0IArs4c6QAAC+tJREFUaEPVWgtwVEUWPf1mJoEwCfkQ8s/MJIBCkgIFBBRdZLfElUWNIl/FKqFABfkUYLR0DYJsiaACy7pYBeUCtSoKogiu+EUQBYIuLi6GfGZevuQf859k5r3e6p7My5vkvUwmsoJdlcrMe7fvvafv7dv33h6CfoyqUaPM7U7nbZIs/4EQkk4pjSaENEEQVlkKC7/rB8tfbQoJRFKRzTaDUroKhEwG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dzy3ntw5ecjPCtLEdW97hVCQnhfnISEcBpmkJrOBEpgF2wOh6dw1wJMH3jAUHzu3EFK6T3sCoWEhLSoQdGmplC96w0fzyBEEsLCPG3FziE1NHhKJIPBZQwPr9dbLO9z6nab2BxDREQNMRo95qQU7pqaHtWdYDY3EqOR16tUlgV+1SMIjaGCkOTtWGoC5hOys4Xiffv+QmW5a1n9aXcNvieCsN5it2f7GKI3PYtstlkU+Gv3O6drEFtPlQipImbz9ZYLF3w8ye+vePg1qtO5FrK8mgKDfgtg+T0x8Ptkh6MrS9Hbw3qAStLSIuWWlpmUkHmE0lsp4ClIr8VByBNWh2OHlmp+Law1iZ3ZLkrHUUpvoMBoCrBr1nBQOpgA6h+sXZHloISY+rqtCLDTIoqP6QnuF+ArgiIAJiVW6+8kQL/28zTk3aB0DSvye2P9mwBcnJLyiCzLXalbd0SEVBsMhllJBQW9LorusRTA4v8qpHqXBQRgEXhrqCBsi7TbG/qizDVvYdFmYznsS14w/MdqwHkIwrtmQXhNnVT8pgF3Znzs8op1EGpByGVQesoQHPxFYm5uQD+IUS/E/wDuMBt8jOzH2wAAAABJRU5ErkJggg==";
|
|
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(85893);
|
|
;// CONCATENATED MODULE: ./src/pages/Report/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Report = function Report(_ref) {
|
|
var _Base64$decode;
|
|
objectDestructuringEmpty_default()(_ref);
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
var _useState = (0,react.useState)(true),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
loading = _useState2[0],
|
|
setLoading = _useState2[1];
|
|
var _useState3 = (0,react.useState)({}),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
data = _useState4[0],
|
|
setData = _useState4[1];
|
|
(0,react.useEffect)(function () {
|
|
getData();
|
|
}, []);
|
|
var getData = /*#__PURE__*/function () {
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
_context.next = 2;
|
|
return (0,fetch/* default */.ZP)("/api/tasks/".concat(params === null || params === void 0 ? void 0 : params.taskId, "/get_game_report.json"), {
|
|
method: 'get',
|
|
params: {
|
|
game_report_id: params === null || params === void 0 ? void 0 : params.game_report_id
|
|
}
|
|
});
|
|
case 2:
|
|
res = _context.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
setData(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, res.report), res.code), {}, {
|
|
created_at: res === null || res === void 0 ? void 0 : res.created_at
|
|
}));
|
|
}
|
|
setLoading(false);
|
|
case 5:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function getData() {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
var item = data !== null && data !== void 0 && data.content ? (_Base64$decode = base64.Base64.decode(data.content)) === null || _Base64$decode === void 0 ? void 0 : _Base64$decode.split('\n') : [];
|
|
console.log(item, 'item');
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(skeleton/* default */.Z, {
|
|
loading: loading,
|
|
active: true,
|
|
paragraph: {
|
|
rows: 5
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Reportmodules.wrap,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Reportmodules.title,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
to: "/shuxuns",
|
|
children: '实践项目 >'
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u6027\u80FD\u62A5\u544A"
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Reportmodules.content,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Reportmodules.head,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
width: 30,
|
|
src: pt0_namespaceObject,
|
|
alt: ""
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u5934\u6B4C\u4EE3\u7801\u6027\u80FD\u62A5\u544A"
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Reportmodules.box,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Reportmodules.border,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Reportmodules.table,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Reportmodules.left,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: ["\u5F53\u524D\u89C6\u56FE\uFF1A ", (data === null || data === void 0 ? void 0 : data.TN) || '-']
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: ["\u6D4B\u8BD5\u6587\u4EF6\uFF1A ", data === null || data === void 0 ? void 0 : data.SF]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: ["\u6D4B\u8BD5\u65F6\u95F4\uFF1A ", data === null || data === void 0 ? void 0 : data.created_at]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Reportmodules.right,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
|
|
className: "mt5",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("li", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
children: "\u8986\u76D6"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
children: "\u5171\u8BA1"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
children: "\u547D\u4E2D"
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
|
|
className: "mt5 mb10",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
children: "\u4EE3\u7801\u884C\uFF1A"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
className: Reportmodules.g,
|
|
children: [parseFloat(String(Number(data === null || data === void 0 ? void 0 : data.LH) / Number(data === null || data === void 0 ? void 0 : data.LF) * 100)).toFixed(0), "%"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
className: Reportmodules.y,
|
|
children: data === null || data === void 0 ? void 0 : data.LF
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
className: Reportmodules.y,
|
|
children: data === null || data === void 0 ? void 0 : data.LH
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
children: "\u51FD\xA0\xA0\u6570\uFF1A"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
className: Reportmodules.g,
|
|
children: [parseFloat(String(Number(data === null || data === void 0 ? void 0 : data.FNH) / Number(data === null || data === void 0 ? void 0 : data.FNF) * 100)).toFixed(0), "%"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
className: Reportmodules.y,
|
|
children: data === null || data === void 0 ? void 0 : data.FNF
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
className: Reportmodules.y,
|
|
children: data === null || data === void 0 ? void 0 : data.FNH
|
|
})]
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Reportmodules.sub,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {}), "\u6267\u884C\u6548\u7387"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("pre", {
|
|
style: {
|
|
margin: 0
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Reportmodules.headLine,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u884C\u53F7"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u6267\u884C\u6B21\u6570"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u6E90\u7801"
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Reportmodules.code,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Reportmodules.lineNum,
|
|
children: item === null || item === void 0 ? void 0 : item.map(function (e, i) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: i + 1
|
|
});
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Reportmodules.lineCode,
|
|
children: item === null || item === void 0 ? void 0 : item.map(function (e, i) {
|
|
var _data$DA, _row$split;
|
|
var row = data === null || data === void 0 ? void 0 : (_data$DA = data.DA) === null || _data$DA === void 0 ? void 0 : _data$DA.find(function (k) {
|
|
return k.split(',')[0] === String(i + 1);
|
|
});
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Reportmodules.line,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: row ? Reportmodules.highlight : '',
|
|
children: row === null || row === void 0 ? void 0 : (_row$split = row.split(',')) === null || _row$split === void 0 ? void 0 : _row$split[1]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: !!e && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: row ? Reportmodules.highlight : '',
|
|
children: e
|
|
})
|
|
})]
|
|
});
|
|
})
|
|
})]
|
|
})]
|
|
})]
|
|
})
|
|
})]
|
|
})]
|
|
})
|
|
});
|
|
};
|
|
/* harmony default export */ var pages_Report = (Report);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 73481:
|
|
/*!*************************************************************!*\
|
|
!*** ./node_modules/antd/es/skeleton/index.js + 11 modules ***!
|
|
\*************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"Z": function() { return /* binding */ skeleton; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
var defineProperty = __webpack_require__(4942);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(87462);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
var esm_typeof = __webpack_require__(71002);
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
var classnames = __webpack_require__(94184);
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
var react = __webpack_require__(67294);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
|
|
var context = __webpack_require__(53124);
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/omit.js
|
|
var omit = __webpack_require__(98423);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Element.js
|
|
|
|
|
|
|
|
|
|
var Element = function Element(props) {
|
|
var _classNames, _classNames2;
|
|
var prefixCls = props.prefixCls,
|
|
className = props.className,
|
|
style = props.style,
|
|
size = props.size,
|
|
shape = props.shape;
|
|
var sizeCls = classnames_default()((_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-lg"), size === 'large'), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-sm"), size === 'small'), _classNames));
|
|
var shapeCls = classnames_default()((_classNames2 = {}, (0,defineProperty/* default */.Z)(_classNames2, "".concat(prefixCls, "-circle"), shape === 'circle'), (0,defineProperty/* default */.Z)(_classNames2, "".concat(prefixCls, "-square"), shape === 'square'), (0,defineProperty/* default */.Z)(_classNames2, "".concat(prefixCls, "-round"), shape === 'round'), _classNames2));
|
|
var sizeStyle = react.useMemo(function () {
|
|
return typeof size === 'number' ? {
|
|
width: size,
|
|
height: size,
|
|
lineHeight: "".concat(size, "px")
|
|
} : {};
|
|
}, [size]);
|
|
return /*#__PURE__*/react.createElement("span", {
|
|
className: classnames_default()(prefixCls, sizeCls, shapeCls, className),
|
|
style: (0,esm_extends/* default */.Z)((0,esm_extends/* default */.Z)({}, sizeStyle), style)
|
|
});
|
|
};
|
|
/* harmony default export */ var skeleton_Element = (Element);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Avatar.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var SkeletonAvatar = function SkeletonAvatar(props) {
|
|
var customizePrefixCls = props.prefixCls,
|
|
className = props.className,
|
|
active = props.active,
|
|
_props$shape = props.shape,
|
|
shape = _props$shape === void 0 ? 'circle' : _props$shape,
|
|
_props$size = props.size,
|
|
size = _props$size === void 0 ? 'default' : _props$size;
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
var prefixCls = getPrefixCls('skeleton', customizePrefixCls);
|
|
var otherProps = (0,omit/* default */.Z)(props, ['prefixCls', 'className']);
|
|
var cls = classnames_default()(prefixCls, "".concat(prefixCls, "-element"), (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-active"), active), className);
|
|
return /*#__PURE__*/react.createElement("div", {
|
|
className: cls
|
|
}, /*#__PURE__*/react.createElement(skeleton_Element, (0,esm_extends/* default */.Z)({
|
|
prefixCls: "".concat(prefixCls, "-avatar"),
|
|
shape: shape,
|
|
size: size
|
|
}, otherProps)));
|
|
};
|
|
/* harmony default export */ var Avatar = (SkeletonAvatar);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Button.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var SkeletonButton = function SkeletonButton(props) {
|
|
var _classNames;
|
|
var customizePrefixCls = props.prefixCls,
|
|
className = props.className,
|
|
active = props.active,
|
|
_props$block = props.block,
|
|
block = _props$block === void 0 ? false : _props$block,
|
|
_props$size = props.size,
|
|
size = _props$size === void 0 ? 'default' : _props$size;
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
var prefixCls = getPrefixCls('skeleton', customizePrefixCls);
|
|
var otherProps = (0,omit/* default */.Z)(props, ['prefixCls']);
|
|
var cls = classnames_default()(prefixCls, "".concat(prefixCls, "-element"), (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-active"), active), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-block"), block), _classNames), className);
|
|
return /*#__PURE__*/react.createElement("div", {
|
|
className: cls
|
|
}, /*#__PURE__*/react.createElement(skeleton_Element, (0,esm_extends/* default */.Z)({
|
|
prefixCls: "".concat(prefixCls, "-button"),
|
|
size: size
|
|
}, otherProps)));
|
|
};
|
|
/* harmony default export */ var Button = (SkeletonButton);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
|
|
var objectSpread2 = __webpack_require__(1413);
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/DotChartOutlined.js
|
|
// This icon file is generated automatically.
|
|
var DotChartOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM288 604a64 64 0 10128 0 64 64 0 10-128 0zm118-224a48 48 0 1096 0 48 48 0 10-96 0zm158 228a96 96 0 10192 0 96 96 0 10-192 0zm148-314a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, "name": "dot-chart", "theme": "outlined" };
|
|
/* harmony default export */ var asn_DotChartOutlined = (DotChartOutlined);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/node_modules/@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
var AntdIcon = __webpack_require__(93771);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/node_modules/@ant-design/icons/es/icons/DotChartOutlined.js
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
var DotChartOutlined_DotChartOutlined = function DotChartOutlined(props, ref) {
|
|
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, {
|
|
ref: ref,
|
|
icon: asn_DotChartOutlined
|
|
}));
|
|
};
|
|
DotChartOutlined_DotChartOutlined.displayName = 'DotChartOutlined';
|
|
/* harmony default export */ var icons_DotChartOutlined = (/*#__PURE__*/react.forwardRef(DotChartOutlined_DotChartOutlined));
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Node.js
|
|
|
|
|
|
|
|
|
|
|
|
var SkeletonNode = function SkeletonNode(props) {
|
|
var customizePrefixCls = props.prefixCls,
|
|
className = props.className,
|
|
style = props.style,
|
|
active = props.active,
|
|
children = props.children;
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
var prefixCls = getPrefixCls('skeleton', customizePrefixCls);
|
|
var cls = classnames_default()(prefixCls, "".concat(prefixCls, "-element"), (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-active"), active), className);
|
|
var content = children !== null && children !== void 0 ? children : /*#__PURE__*/react.createElement(icons_DotChartOutlined, null);
|
|
return /*#__PURE__*/react.createElement("div", {
|
|
className: cls
|
|
}, /*#__PURE__*/react.createElement("div", {
|
|
className: classnames_default()("".concat(prefixCls, "-image"), className),
|
|
style: style
|
|
}, content));
|
|
};
|
|
/* harmony default export */ var Node = (SkeletonNode);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Image.js
|
|
|
|
|
|
|
|
|
|
var path = 'M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z';
|
|
var SkeletonImage = function SkeletonImage(props) {
|
|
var customizePrefixCls = props.prefixCls,
|
|
className = props.className,
|
|
style = props.style,
|
|
active = props.active;
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
var prefixCls = getPrefixCls('skeleton', customizePrefixCls);
|
|
var cls = classnames_default()(prefixCls, "".concat(prefixCls, "-element"), (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-active"), active), className);
|
|
return /*#__PURE__*/react.createElement("div", {
|
|
className: cls
|
|
}, /*#__PURE__*/react.createElement("div", {
|
|
className: classnames_default()("".concat(prefixCls, "-image"), className),
|
|
style: style
|
|
}, /*#__PURE__*/react.createElement("svg", {
|
|
viewBox: "0 0 1098 1024",
|
|
xmlns: "http://www.w3.org/2000/svg",
|
|
className: "".concat(prefixCls, "-image-svg")
|
|
}, /*#__PURE__*/react.createElement("path", {
|
|
d: path,
|
|
className: "".concat(prefixCls, "-image-path")
|
|
}))));
|
|
};
|
|
/* harmony default export */ var Image = (SkeletonImage);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Input.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var SkeletonInput = function SkeletonInput(props) {
|
|
var _classNames;
|
|
var customizePrefixCls = props.prefixCls,
|
|
className = props.className,
|
|
active = props.active,
|
|
block = props.block,
|
|
_props$size = props.size,
|
|
size = _props$size === void 0 ? 'default' : _props$size;
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
var prefixCls = getPrefixCls('skeleton', customizePrefixCls);
|
|
var otherProps = (0,omit/* default */.Z)(props, ['prefixCls']);
|
|
var cls = classnames_default()(prefixCls, "".concat(prefixCls, "-element"), (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-active"), active), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-block"), block), _classNames), className);
|
|
return /*#__PURE__*/react.createElement("div", {
|
|
className: cls
|
|
}, /*#__PURE__*/react.createElement(skeleton_Element, (0,esm_extends/* default */.Z)({
|
|
prefixCls: "".concat(prefixCls, "-input"),
|
|
size: size
|
|
}, otherProps)));
|
|
};
|
|
/* harmony default export */ var Input = (SkeletonInput);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
|
|
var toConsumableArray = __webpack_require__(74902);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Paragraph.js
|
|
|
|
|
|
|
|
var Paragraph = function Paragraph(props) {
|
|
var getWidth = function getWidth(index) {
|
|
var width = props.width,
|
|
_props$rows = props.rows,
|
|
rows = _props$rows === void 0 ? 2 : _props$rows;
|
|
if (Array.isArray(width)) {
|
|
return width[index];
|
|
}
|
|
// last paragraph
|
|
if (rows - 1 === index) {
|
|
return width;
|
|
}
|
|
return undefined;
|
|
};
|
|
var prefixCls = props.prefixCls,
|
|
className = props.className,
|
|
style = props.style,
|
|
rows = props.rows;
|
|
var rowList = (0,toConsumableArray/* default */.Z)(Array(rows)).map(function (_, index) {
|
|
return (
|
|
/*#__PURE__*/
|
|
// eslint-disable-next-line react/no-array-index-key
|
|
react.createElement("li", {
|
|
key: index,
|
|
style: {
|
|
width: getWidth(index)
|
|
}
|
|
})
|
|
);
|
|
});
|
|
return /*#__PURE__*/react.createElement("ul", {
|
|
className: classnames_default()(prefixCls, className),
|
|
style: style
|
|
}, rowList);
|
|
};
|
|
/* harmony default export */ var skeleton_Paragraph = (Paragraph);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Title.js
|
|
|
|
/* eslint-disable jsx-a11y/heading-has-content */
|
|
|
|
|
|
var Title = function Title(_ref) {
|
|
var prefixCls = _ref.prefixCls,
|
|
className = _ref.className,
|
|
width = _ref.width,
|
|
style = _ref.style;
|
|
return /*#__PURE__*/react.createElement("h3", {
|
|
className: classnames_default()(prefixCls, className),
|
|
style: (0,esm_extends/* default */.Z)({
|
|
width: width
|
|
}, style)
|
|
});
|
|
};
|
|
/* harmony default export */ var skeleton_Title = (Title);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/Skeleton.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function getComponentProps(prop) {
|
|
if (prop && (0,esm_typeof/* default */.Z)(prop) === 'object') {
|
|
return prop;
|
|
}
|
|
return {};
|
|
}
|
|
function getAvatarBasicProps(hasTitle, hasParagraph) {
|
|
if (hasTitle && !hasParagraph) {
|
|
// Square avatar
|
|
return {
|
|
size: 'large',
|
|
shape: 'square'
|
|
};
|
|
}
|
|
return {
|
|
size: 'large',
|
|
shape: 'circle'
|
|
};
|
|
}
|
|
function getTitleBasicProps(hasAvatar, hasParagraph) {
|
|
if (!hasAvatar && hasParagraph) {
|
|
return {
|
|
width: '38%'
|
|
};
|
|
}
|
|
if (hasAvatar && hasParagraph) {
|
|
return {
|
|
width: '50%'
|
|
};
|
|
}
|
|
return {};
|
|
}
|
|
function getParagraphBasicProps(hasAvatar, hasTitle) {
|
|
var basicProps = {};
|
|
// Width
|
|
if (!hasAvatar || !hasTitle) {
|
|
basicProps.width = '61%';
|
|
}
|
|
// Rows
|
|
if (!hasAvatar && hasTitle) {
|
|
basicProps.rows = 3;
|
|
} else {
|
|
basicProps.rows = 2;
|
|
}
|
|
return basicProps;
|
|
}
|
|
var Skeleton = function Skeleton(props) {
|
|
var customizePrefixCls = props.prefixCls,
|
|
loading = props.loading,
|
|
className = props.className,
|
|
style = props.style,
|
|
children = props.children,
|
|
_props$avatar = props.avatar,
|
|
avatar = _props$avatar === void 0 ? false : _props$avatar,
|
|
_props$title = props.title,
|
|
title = _props$title === void 0 ? true : _props$title,
|
|
_props$paragraph = props.paragraph,
|
|
paragraph = _props$paragraph === void 0 ? true : _props$paragraph,
|
|
active = props.active,
|
|
round = props.round;
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
direction = _React$useContext.direction;
|
|
var prefixCls = getPrefixCls('skeleton', customizePrefixCls);
|
|
if (loading || !('loading' in props)) {
|
|
var _classNames;
|
|
var hasAvatar = !!avatar;
|
|
var hasTitle = !!title;
|
|
var hasParagraph = !!paragraph;
|
|
// Avatar
|
|
var avatarNode;
|
|
if (hasAvatar) {
|
|
var avatarProps = (0,esm_extends/* default */.Z)((0,esm_extends/* default */.Z)({
|
|
prefixCls: "".concat(prefixCls, "-avatar")
|
|
}, getAvatarBasicProps(hasTitle, hasParagraph)), getComponentProps(avatar));
|
|
// We direct use SkeletonElement as avatar in skeleton internal.
|
|
avatarNode = /*#__PURE__*/react.createElement("div", {
|
|
className: "".concat(prefixCls, "-header")
|
|
}, /*#__PURE__*/react.createElement(skeleton_Element, (0,esm_extends/* default */.Z)({}, avatarProps)));
|
|
}
|
|
var contentNode;
|
|
if (hasTitle || hasParagraph) {
|
|
// Title
|
|
var $title;
|
|
if (hasTitle) {
|
|
var titleProps = (0,esm_extends/* default */.Z)((0,esm_extends/* default */.Z)({
|
|
prefixCls: "".concat(prefixCls, "-title")
|
|
}, getTitleBasicProps(hasAvatar, hasParagraph)), getComponentProps(title));
|
|
$title = /*#__PURE__*/react.createElement(skeleton_Title, (0,esm_extends/* default */.Z)({}, titleProps));
|
|
}
|
|
// Paragraph
|
|
var paragraphNode;
|
|
if (hasParagraph) {
|
|
var paragraphProps = (0,esm_extends/* default */.Z)((0,esm_extends/* default */.Z)({
|
|
prefixCls: "".concat(prefixCls, "-paragraph")
|
|
}, getParagraphBasicProps(hasAvatar, hasTitle)), getComponentProps(paragraph));
|
|
paragraphNode = /*#__PURE__*/react.createElement(skeleton_Paragraph, (0,esm_extends/* default */.Z)({}, paragraphProps));
|
|
}
|
|
contentNode = /*#__PURE__*/react.createElement("div", {
|
|
className: "".concat(prefixCls, "-content")
|
|
}, $title, paragraphNode);
|
|
}
|
|
var cls = classnames_default()(prefixCls, (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-with-avatar"), hasAvatar), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-active"), active), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-round"), round), _classNames), className);
|
|
return /*#__PURE__*/react.createElement("div", {
|
|
className: cls,
|
|
style: style
|
|
}, avatarNode, contentNode);
|
|
}
|
|
return typeof children !== 'undefined' ? children : null;
|
|
};
|
|
Skeleton.Button = Button;
|
|
Skeleton.Avatar = Avatar;
|
|
Skeleton.Input = Input;
|
|
Skeleton.Image = Image;
|
|
Skeleton.Node = Node;
|
|
/* harmony default export */ var skeleton_Skeleton = (Skeleton);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/index.js
|
|
|
|
/* harmony default export */ var skeleton = (skeleton_Skeleton);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 61099:
|
|
/*!******************************************************************!*\
|
|
!*** ./node_modules/antd/es/skeleton/style/index.js + 1 modules ***!
|
|
\******************************************************************/
|
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/style/default.less
|
|
var style_default = __webpack_require__(43146);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/style/index.less
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/skeleton/style/index.js
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 19575:
|
|
/*!******************************************!*\
|
|
!*** ./node_modules/js-base64/base64.js ***!
|
|
\******************************************/
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
|
* base64.js
|
|
*
|
|
* Licensed under the BSD 3-Clause License.
|
|
* http://opensource.org/licenses/BSD-3-Clause
|
|
*
|
|
* References:
|
|
* http://en.wikipedia.org/wiki/Base64
|
|
*/
|
|
;(function (global, factory) {
|
|
true
|
|
? module.exports = factory(global)
|
|
: 0
|
|
}((
|
|
typeof self !== 'undefined' ? self
|
|
: typeof window !== 'undefined' ? window
|
|
: typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g
|
|
: this
|
|
), function(global) {
|
|
'use strict';
|
|
// existing version for noConflict()
|
|
global = global || {};
|
|
var _Base64 = global.Base64;
|
|
var version = "2.6.4";
|
|
// constants
|
|
var b64chars
|
|
= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
var b64tab = function(bin) {
|
|
var t = {};
|
|
for (var i = 0, l = bin.length; i < l; i++) t[bin.charAt(i)] = i;
|
|
return t;
|
|
}(b64chars);
|
|
var fromCharCode = String.fromCharCode;
|
|
// encoder stuff
|
|
var cb_utob = function(c) {
|
|
if (c.length < 2) {
|
|
var cc = c.charCodeAt(0);
|
|
return cc < 0x80 ? c
|
|
: cc < 0x800 ? (fromCharCode(0xc0 | (cc >>> 6))
|
|
+ fromCharCode(0x80 | (cc & 0x3f)))
|
|
: (fromCharCode(0xe0 | ((cc >>> 12) & 0x0f))
|
|
+ fromCharCode(0x80 | ((cc >>> 6) & 0x3f))
|
|
+ fromCharCode(0x80 | ( cc & 0x3f)));
|
|
} else {
|
|
var cc = 0x10000
|
|
+ (c.charCodeAt(0) - 0xD800) * 0x400
|
|
+ (c.charCodeAt(1) - 0xDC00);
|
|
return (fromCharCode(0xf0 | ((cc >>> 18) & 0x07))
|
|
+ fromCharCode(0x80 | ((cc >>> 12) & 0x3f))
|
|
+ fromCharCode(0x80 | ((cc >>> 6) & 0x3f))
|
|
+ fromCharCode(0x80 | ( cc & 0x3f)));
|
|
}
|
|
};
|
|
var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
|
|
var utob = function(u) {
|
|
return u.replace(re_utob, cb_utob);
|
|
};
|
|
var cb_encode = function(ccc) {
|
|
var padlen = [0, 2, 1][ccc.length % 3],
|
|
ord = ccc.charCodeAt(0) << 16
|
|
| ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8)
|
|
| ((ccc.length > 2 ? ccc.charCodeAt(2) : 0)),
|
|
chars = [
|
|
b64chars.charAt( ord >>> 18),
|
|
b64chars.charAt((ord >>> 12) & 63),
|
|
padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63),
|
|
padlen >= 1 ? '=' : b64chars.charAt(ord & 63)
|
|
];
|
|
return chars.join('');
|
|
};
|
|
var btoa = global.btoa && typeof global.btoa == 'function'
|
|
? function(b){ return global.btoa(b) } : function(b) {
|
|
if (b.match(/[^\x00-\xFF]/)) throw new RangeError(
|
|
'The string contains invalid characters.'
|
|
);
|
|
return b.replace(/[\s\S]{1,3}/g, cb_encode);
|
|
};
|
|
var _encode = function(u) {
|
|
return btoa(utob(String(u)));
|
|
};
|
|
var mkUriSafe = function (b64) {
|
|
return b64.replace(/[+\/]/g, function(m0) {
|
|
return m0 == '+' ? '-' : '_';
|
|
}).replace(/=/g, '');
|
|
};
|
|
var encode = function(u, urisafe) {
|
|
return urisafe ? mkUriSafe(_encode(u)) : _encode(u);
|
|
};
|
|
var encodeURI = function(u) { return encode(u, true) };
|
|
var fromUint8Array;
|
|
if (global.Uint8Array) fromUint8Array = function(a, urisafe) {
|
|
// return btoa(fromCharCode.apply(null, a));
|
|
var b64 = '';
|
|
for (var i = 0, l = a.length; i < l; i += 3) {
|
|
var a0 = a[i], a1 = a[i+1], a2 = a[i+2];
|
|
var ord = a0 << 16 | a1 << 8 | a2;
|
|
b64 += b64chars.charAt( ord >>> 18)
|
|
+ b64chars.charAt((ord >>> 12) & 63)
|
|
+ ( typeof a1 != 'undefined'
|
|
? b64chars.charAt((ord >>> 6) & 63) : '=')
|
|
+ ( typeof a2 != 'undefined'
|
|
? b64chars.charAt( ord & 63) : '=');
|
|
}
|
|
return urisafe ? mkUriSafe(b64) : b64;
|
|
};
|
|
// decoder stuff
|
|
var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
|
|
var cb_btou = function(cccc) {
|
|
switch(cccc.length) {
|
|
case 4:
|
|
var cp = ((0x07 & cccc.charCodeAt(0)) << 18)
|
|
| ((0x3f & cccc.charCodeAt(1)) << 12)
|
|
| ((0x3f & cccc.charCodeAt(2)) << 6)
|
|
| (0x3f & cccc.charCodeAt(3)),
|
|
offset = cp - 0x10000;
|
|
return (fromCharCode((offset >>> 10) + 0xD800)
|
|
+ fromCharCode((offset & 0x3FF) + 0xDC00));
|
|
case 3:
|
|
return fromCharCode(
|
|
((0x0f & cccc.charCodeAt(0)) << 12)
|
|
| ((0x3f & cccc.charCodeAt(1)) << 6)
|
|
| (0x3f & cccc.charCodeAt(2))
|
|
);
|
|
default:
|
|
return fromCharCode(
|
|
((0x1f & cccc.charCodeAt(0)) << 6)
|
|
| (0x3f & cccc.charCodeAt(1))
|
|
);
|
|
}
|
|
};
|
|
var btou = function(b) {
|
|
return b.replace(re_btou, cb_btou);
|
|
};
|
|
var cb_decode = function(cccc) {
|
|
var len = cccc.length,
|
|
padlen = len % 4,
|
|
n = (len > 0 ? b64tab[cccc.charAt(0)] << 18 : 0)
|
|
| (len > 1 ? b64tab[cccc.charAt(1)] << 12 : 0)
|
|
| (len > 2 ? b64tab[cccc.charAt(2)] << 6 : 0)
|
|
| (len > 3 ? b64tab[cccc.charAt(3)] : 0),
|
|
chars = [
|
|
fromCharCode( n >>> 16),
|
|
fromCharCode((n >>> 8) & 0xff),
|
|
fromCharCode( n & 0xff)
|
|
];
|
|
chars.length -= [0, 0, 2, 1][padlen];
|
|
return chars.join('');
|
|
};
|
|
var _atob = global.atob && typeof global.atob == 'function'
|
|
? function(a){ return global.atob(a) } : function(a){
|
|
return a.replace(/\S{1,4}/g, cb_decode);
|
|
};
|
|
var atob = function(a) {
|
|
return _atob(String(a).replace(/[^A-Za-z0-9\+\/]/g, ''));
|
|
};
|
|
var _decode = function(a) { return btou(_atob(a)) };
|
|
var _fromURI = function(a) {
|
|
return String(a).replace(/[-_]/g, function(m0) {
|
|
return m0 == '-' ? '+' : '/'
|
|
}).replace(/[^A-Za-z0-9\+\/]/g, '');
|
|
};
|
|
var decode = function(a){
|
|
return _decode(_fromURI(a));
|
|
};
|
|
var toUint8Array;
|
|
if (global.Uint8Array) toUint8Array = function(a) {
|
|
return Uint8Array.from(atob(_fromURI(a)), function(c) {
|
|
return c.charCodeAt(0);
|
|
});
|
|
};
|
|
var noConflict = function() {
|
|
var Base64 = global.Base64;
|
|
global.Base64 = _Base64;
|
|
return Base64;
|
|
};
|
|
// export Base64
|
|
global.Base64 = {
|
|
VERSION: version,
|
|
atob: atob,
|
|
btoa: btoa,
|
|
fromBase64: decode,
|
|
toBase64: encode,
|
|
utob: utob,
|
|
encode: encode,
|
|
encodeURI: encodeURI,
|
|
btou: btou,
|
|
decode: decode,
|
|
noConflict: noConflict,
|
|
fromUint8Array: fromUint8Array,
|
|
toUint8Array: toUint8Array
|
|
};
|
|
// if ES5 is available, make Base64.extendString() available
|
|
if (typeof Object.defineProperty === 'function') {
|
|
var noEnum = function(v){
|
|
return {value:v,enumerable:false,writable:true,configurable:true};
|
|
};
|
|
global.Base64.extendString = function () {
|
|
Object.defineProperty(
|
|
String.prototype, 'fromBase64', noEnum(function () {
|
|
return decode(this)
|
|
}));
|
|
Object.defineProperty(
|
|
String.prototype, 'toBase64', noEnum(function (urisafe) {
|
|
return encode(this, urisafe)
|
|
}));
|
|
Object.defineProperty(
|
|
String.prototype, 'toBase64URI', noEnum(function () {
|
|
return encode(this, true)
|
|
}));
|
|
};
|
|
}
|
|
//
|
|
// export Base64 to the namespace
|
|
//
|
|
if (global['Meteor']) { // Meteor.js
|
|
Base64 = global.Base64;
|
|
}
|
|
// module.exports and AMD are mutually exclusive.
|
|
// module.exports has precedence.
|
|
if ( true && module.exports) {
|
|
module.exports.Base64 = global.Base64;
|
|
}
|
|
else if (true) {
|
|
// AMD. Register as an anonymous module.
|
|
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function(){ return global.Base64 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
|
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
}
|
|
// that's it!
|
|
return {Base64: global.Base64}
|
|
}));
|
|
|
|
|
|
/***/ })
|
|
|
|
}]); |